Iran drew strong backing in the tense dispute over its nuclear programme as developing-world leaders agreed at a summit in Havana that Tehran had the right to use atomic energy.
National leaders of the 118-state Non Aligned Movement (NAM) adopted a statement on Saturday in which they "reaffirmed the basic and inalienable right of all states to develop research, production and use of atomic energy for peaceful purposes."
They also said "the only way to resolve the issue is to resume negotiations without any preconditions."
"They recognized the need for a comprehensive multilaterally negotiated instrument, prohibiting attacks, or threat of attacks on nuclear facilities devoted to peaceful uses of nuclear energy."
The statement was an updated version of a document adopted at a NAM ministerial meeting in Malaysia in May.
The heads of state and government pointed out that the International Atomic Energy Agency found that all nuclear material declared by Iran had been accounted for, and urged Iran to continue cooperating fully with the IAEA.
They warned that any attack or threat against a nuclear facility used for peaceful purposes posed serious risks and was a violation of international law.
The NAM leaders called for a negotiated settlement to the dispute.
Several leaders spoke out in defence of Iran at the summit, including including Venezuelan President Hugo Chavez, a staunch foe of the United States. Following the gathering, Ahmadinejad was to travel to oil-rich Venezuela, a fellow member of the Organization of Petroleum Exporting Countries (OPEC).