Egypt and Iran vie for regional leadership
Iran's hope for the Non-Aligned Movement summit is simple: to show the West that the Islamic Republic has plenty of friends elsewhere.
But on the first morning of the formal conference, two speakers diverged from Iran's script.
"I strongly reject threats by any member state to destroy another or outrageous attempts to deny historical facts such as the Holocaust," UN Secretary General Ban Ki-moon told the summit.
He didn't name Iran, but the meaning of his words was clear.
And then Egyptian President Mohammed Morsi exposed the divisions in the Middle East over what to do about Syria, a close ally of Iran.
"Our solidarity with the struggle of the Syrian people against an oppressive regime that has lost its legitimacy is an ethical duty as it is a political and strategic necessity," Mr Morsi told the summit.
This was too much for the Syrian delegation, which walked out - an exit not broadcast on state TV. Iran's state media confirmed the exit, but provided an alternative explanation.
"The Syrian delegation did not withdraw from the Non-Aligned Movement summit but [Foreign Minister] al-Muallem left to conduct an interview with al-Alam TV then returned," al-Alam, the Iranian Arabic-language channel said.
One Iranian state media channel, IRTV1, appeared to apply a different tactic. It mistranslated Mr Morsi's words from Arabic into Persian - giving the impression that Egypt's president was actually speaking in support of the Syrian government.
"Dear sisters and brothers," the Arabic-Persian translation ran on IRTV1, "the issue of our solidarity with the Syrian nation against the plot that has been implemented against this country should not be forgotten. This is a moral duty and a political and strategic duty."
Divisions over Syria may overshadow this summit. The conference in Tehran brings together countries that take opposite sides in the Syria conflict - in particular Egypt and Iran.
Iran's religious-led government provides strong support to the government of Bashar al-Assad. The Iran-Syria alliance began more than 30 years ago because of a shared hatred of Saddam Hussein's Iraq.
It has endured and developed into a deep partnership. Syria may be Iran's only long-term ally in the Middle East. For that reason, Iran's government wants to make sure that Mr Assad's government survives.
But Egypt's new government takes a different view. Mohammed Morsi came to power with the support of the Muslim Brotherhood - a group that supports the Sunni opposition in Syria.
Mr Morsi's strong statements at the summit make it clear which side Egypt takes. It also provides another opportunity for Egypt and Iran to fight for regional leadership.
For many years, each of the two countries has seen itself as the natural leader of the Middle East. Egypt believes that it represents the heartland of the Arab and Sunni Middle East.
But Iran, which is predominantly Persian and Shia, believes that its own history gives it the right to take the lead. This fight is being played out at the summit in Tehran.