Putin has said that no Caspian Sea state should let its soil be used to attack a fellow coastal country.
"The parties underline that under no circumstances would they allow other nations to use their territory for waging aggression or other military action against any of the parties," the declaration said.
Putin had said earlier: "We should not even think of making use of force in this region."
Collectively, the summit participants also said all signatories to the nuclear Non-Proliferation Treaty have a right to develop peaceful nuclear technology.
The states had "expressed the idea that peaceful nuclear activities must be allowed," Putin said.
Iran is embroiled in a nuclear standoff with Western nations which accuse Tehran of seeking atomic weapons, a charge Tehran denies.
Washington has refused to rule out the use of military action if diplomacy fails to resolve the row.
Russian media have speculated that Washington might be trying to negotiate with Azerbaijan on the right to use military facilities in the Caucasus republic.
Putin was the first Kremlin leader to travel to Iran since Josef Stalin, the former Soviet leader, attended a wartime summit with Winston Churchill, former British prime minister, and Franklin Roosevelt, former US president, in 1943.
Putin has favoured diplomacy over sanctions, but if the bilateral relations between the two countries cool down, the Western powers may be empowered to seek a third round of sanctions with Russian support.
The Russian leader, however, said contractual and technical problems remained over the delivery of fuel to Bushehr, which is being built with the help of Russian contractors.
"At the moment Russia and Iran are discussing the issue of changing the contract. In general there is a common understanding of the problem," he said.
Iranian officials deny there are problems over payments.
Oil and gas
The leaders of the five states failed to reach an agreement on how to divide the resources of the Caspian Sea, which contains huge oil and gas reserves and sturgeon fish, valued as a source of caviar.
"The countries that feel threatened ... should prepare for defence, and even counterattack"
Adolfo Talpalar, Stockholm, Sweden
Send us your views
The final declaration, signed by all five states, said setting up a legal framework for control of the sea was "the most important duty" but did not give a timetable for achieving this.
The Caspian has oil reserves of as much as 49 billion barrels - equal to about half that of an Opec member such as Kuwait - and reservoirs with 230 trillion cubic feet of gas.
Russia had argued for dividing the seabed between the five states but keeping the waters in common use.
Some experts say this is so as it needs more room to move its Caspian navy of a 100 or so ships, far larger than any other coastal state.
Iran wants all resources shared equally among five states, even though its coast accounts for less than 14 per cent of the total area.
Putin's trip had been overshadowed by rumours that he might be the target of an assassination attempt.