President Mohammad Mursi has become the first Egyptian leader to visit Iran since its Islamic revolution in 1979.
He is attending a summit of the Non-Aligned Movement, set up in 1961 to counter US and Soviet dominance during the Cold War.
Iran will head the group for the next three years.
For Supreme Leader Ayatollah Ali Khamenei, it is a platform to fight back against sanctions and attempts to isolate Iran.
The country will never develop an atomic bomb but will not give up peaceful nuclear energy, he told leaders like Afghanistan’s Hamid Karzai and Palestinian Mahmoud Abbas. The West is not convinced.
Mursi used his speech to criticise as “oppressive” the government of Syria, a regime which Iran staunchly supports. He urged the opposition to unite.
UN Secretary General Ban Ki-moon is also attending, defying calls from the US and Israel to boycott the event.