Iran scored a point against Western efforts to isolate it by hosting a summit this week of 120 Non-Aligned Movement countries, but its bid to boost its prestige was wrongfooted by a new report on its controversial nuclear activities, analysts said.
Despite star guests Egyptian President Mohamed Morsi and UN chief Ban Ki-moon strongly criticising Tehran policies during the summit, Iranian leaders and media were describing the event, in the words of the state newspaper Iran, as "the biggest success in Iran's history."
Several outlets saw it as "a diplomatic defeat of the United States and the West" and hailed what they saw as boost to Iran's regional diplomacy.
The summit "enabled Iran to show it still has friends and trade partners despite international efforts to isolate it," one analyst, Dina Esfandiary of Britain's International Institute for Strategic Studies, told AFP.
Smack in the middle of it, though, the International Atomic Energy Agency (IAEA) released its latest report on Iran that recorded an increase in the number of uranium enrichment centrifuges.
And it said a clean-up at a suspect military base in Parchin had "hampered" IAEA inspectors' ability to determine whether explosives tests for warheads had taken place.
That paired with Ban telling Iranian leaders that they had to comply with IAEA and UN resolutions, or else Iran faced being excluded from the international community and even risked military action by Israel or the United States.
"Sometimes the timing of international summits makes all the difference, and this was one of those occasions," said Mark Hibbs, a senior nuclear issues analyst at the Carnegie Endowment.
"Iran opened by declaring that its peaceful nuclear programme was the victim of a P5 (UN Security Council) conspiracy, but that narrative ran aground on the IAEA’s finding -- announced right in the middle of the meeting -- that Iran has prevented the IAEA from doing its work."
Signup to our newsletter and follow us on Facebook and Twitter!
That, and Ban's remarks, meant "Iran didn’t win this round," he said.
The Islamic republic was further embarrassed by statements from Ban condemning its leaders' anti-Israel remarks, and by him and Morsi -- whom Iran has been reaching out to -- strongly criticising the Syrian regime, a staunch ally of Iran.
Esfandiary, though, said "Iran knew that it would inevitably get some bad press" from those high-profile invitees.
"But Iran judged the benefits of the PR coup to outweigh the negatives. Iran will, for example, play on its tolerance for criticism and its ability to make friends despite differences and detract attention from the release of the IAEA report," she said.
Mohammad Saleh Sedghian, an Iranian analyst at the Arab Centre of Iranian Studies in Tehran, echoed Esfandiary's comments.
"No one should have expected that all the summit participants were going to think and speak the way Tehran wanted," he told AFP
"But in the end, the summit gave a positive image of the Islamic republic, showing it able to welcome 120 nations. And that can help Iran in big international issues" such as the nuclear dispute, he said.
But Alireza Nader, a senior analyst at the US group Rand Corp, said: "I don’t think NAM really enhances Iran’s regional or international position in the long term.
"It may boost the Iranian regime’s image for a little while, but Iran faces a fundamental clash of interests with other NAM states."
Supporting that argument, Nader pointed to Morsi's speech and the decision by major NAM power India to cut back its purchases of Iranian oil in line with US sanctions.
"The NAM summit will not erase pressures the regime faces due to its violation of international norms and its repressive behaviour at home," he said.