A showpiece summit hosted by Iran stumbled as soon as it opened on Thursday when the head of the UN pressed Tehran on its nuclear stand, and Egypt's new leader publicly sided with Syria's opposition.
The double challenge, before the leaders and delegates of the 120-member Non-Aligned Movement, upset Iran's plans to portray the two-day gathering as a diplomatic triumph over Western efforts to isolate it.
Supreme leader Ayatollah Ali Khamenei opened the summit with a speech blasting the United States as a hegemonic meddler and Israel as a regime of "Zionist wolves."
He also said Iran "is never seeking nuclear weapons" and accused the UN Security Council, under US influence, of exerting an "overt dictatorship" over the world.
UN chief Ban Ki-moon, who looked irritated at Khamenei's remarks, shot back that Iran should boost global confidence in its nuclear activities by "fully complying with the relevant Security Council resolutions and thoroughly cooperating with the IAEA," the UN's nuclear watchdog.
Ban warned about bellicose rhetoric from Israel and Iran, saying "a war of words can quickly spiral into a war of violence."
President Mohamed Morsi -- making the first visit to Iran by an Egyptian head of state since the 1979 Islamic revolution -- in turn embarrassed his hosts by voicing support for the Syrian opposition, which is fighting the Damascus regime unwaveringly backed by Iran.
"The revolution in Egypt is the cornerstone for the Arab Spring, which started days after Tunisia and then it was followed by Libya and Yemen and now the revolution in Syria against its oppressive regime," Morsi said.
That contradicted the line put out by Damascus and Tehran, which assert that the Syrian uprising is a "terrorist" plot masterminded by the United States and regional countries.
Morsi's address sparked a walkout by the Damascus delegation and drew a sharp response from Syria's Foreign Minister Walid Muallem, who accused him of inciting further bloodshed in Syria.
Iran's state media failed to mention the contentious parts of the speeches by Ban and Morsi in their coverage, but did later report Khamenei as rejecting "all foreign intervention in Syria."
Khamenei was reported at saying at a meeting with Lebanon's President Michel Sleiman that "the only way to solve the Syrian question is to stop sending weapons to irresponsible groups" in the country.
Tehran accuses certain Western states plus Saudi Arabia, Qatar and Turkey of supplying the Syrian rebels with arms.
Morsi reportedly had a short one-on-one with President Mahmoud Ahmadinejad before leaving Tehran, at which they discussed Syria and the possibility of reviving ties.
Signup to our newsletter and follow us on Facebook and Twitter!
--- Iran nuclear activity under UN scrutiny ---
The summit to-and-fro over Iran's nuclear ambitions had its roots in an unusually frank meeting Ban held with Khamenei and Ahmadinejad after arriving on Wednesday.
He told them Iran needed to provide "concrete" steps to ease the international showdown which has raised the spectre of air strikes on nuclear facilities, threatened by both Israel and the United States.
Tensions have been raised by the IAEA, the International Atomic Energy Agency, unveiling a new Iran "task force" to scrutinise Tehran's nuclear programme and its compliance with UN resolutions.
The latest IAEA report on Iran circulated to IAEA members and seen by AFP but not yet published said Tehran has doubled its capacity at a tough-to-bomb Fordo nuclear facility to 2,000 uranium-enrichment centrifuges from 1,000 in May.
It also said that its ability to inspect the Parchin military base, outside Tehran, where it suspects nuclear weapons research took place had been "significantly hampered" by a suspected clean-up.
The IAEA said it was still "unable to provide credible assurance about the absence of undeclared nuclear material and activities in Iran, and therefore to conclude that all nuclear material in Iran is in peaceful activities."
Washington warned Tehran its window for opening serious talks is limited.
"The window of opportunity to resolve this remains open... but it will not remain open indefinitely," White House spokesman Jay Carney said.
Ban, whose presence at the summit has been criticised by the United States and Israel, also took Iran's leaders to task for recent comments calling Israel a "cancerous tumour" that should be cut out of the Middle East.
He urged both Iran and Israel to cool the bellicose language.
"I strongly reject any threat by any (UN) member state to destroy another, or outrageous comments to deny historical facts such as the Holocaust," Ban said in his summit speech.
"I urge all the parties to stop provocative and inflammatory threats. A war of words can quickly spiral into war of violence. Bluster can so easily become bloodshed. Now is the time for all the leaders to use their voices to lower, not raise, tensions."