Hasan Sarbakhshian, Associated Press
Russian President Vladimir Putin and Iranian President Mahmoud Ahmadinejad listen to anthems Tuesday in Tehran.

TEHRAN, Iran — President Vladimir V. Putin of Russia said at a summit meeting of five Caspian Sea nations in Iran on Tuesday that any use of military force in the region was unacceptable, and in a declaration the countries agreed that none of them would allow their territories to be used as a base for military strikes against any of the others.

"We should not even think of making use of force in this region," Putin said.

Putin's comments and the declaration come at a time when the United States has refused to rule out military action to halt Iran's nuclear energy program, which it believes masks a desire to develop nuclear weapons. Iran says its program, including the enrichment of uranium, is solely for peaceful purposes.

Putin arrived in Tehran on Tuesday for meetings with President Mahmoud Ahmadinejad of Iran and leaders from three other Caspian Sea nations that have rich oil and gas resources, promising to use diplomacy to try to resolve the international debate over Iran's nuclear program.

Putin's statements, which were consistent with his past positions cautioning against military action against Iran, were nonetheless stark in their setting and emphasized his differences with the United States over the extent of Iran's threat and the means to counter it.

"Not only should we reject the use of force, but also the mention of force as a possibility," Putin said.

In spite of Putin's strong statements and the evident show of solidarity among the countries bordering the Caspian Sea — Azerbaijan, Kazakhstan and Turkmenistan, as well as Russia and Iran — significant regional tensions remain.

Iran and the Soviet Union once recognized a water boundary between them and had agreements for sharing its resources. Before 1991, each country took 50 percent of the oil and gas from the sea.

But since the Soviet Union collapsed, the successor governments in the Caspian nations have quarreled over where their sea borders should be drawn.

In the absence of a multilateral agreement and mutually accepted borders, the Caspian nations are developing the oil resources as they see fit, although analysts have said that the absence of clear borders has limited the sector's development.

But the issue of Iran's nuclear program overshadowed the others. Putin's remarks also underscored a longstanding unease in the Kremlin with what it has regarded as a creeping U.S. military presence in Central Asia, a region once solely under Moscow's control.