Iran on Thursday gave a guarded response to the army's removal of Egypt's Islamist president, Mohamed Morsi, calling for the people's "legitimate demands" to be fulfilled and warning of "foreign and enemy opportunism".
Iran welcomed the popular overthrow of Hosni Mubarak in 2011 as part of an "Islamic awakening" and has sought to repair its strained ties with Egypt since Morsi's election victory last year.
Morsi visited Tehran on one of his first official trips abroad, but the two countries have found themselves supporting opposite sides of a civil war in Syria that has taken on increasingly sectarian overtones.
Largely Sunni Muslim Egypt under Morsi voiced its support for mostly Sunni rebel groups seeking to overthrow President Bashar al-Assad, Shi'ite Iran's closest Arab ally.
"Certainly the resistant nation of Egypt will protect its independence and greatness from foreign and enemy opportunism during the difficult conditions that follow," Fars new agency quoted Foreign Ministry spokesman Abbas Araqchi as saying.
"With respect for the political origins of its (Egypt's) discerning, civilised and historic people, the Islamic Republic emphasises the need to fulfil their legitimate demands and is hopeful that ... developments will provide an atmosphere to meet their needs," Araqchi said.
The statement was a good deal more equivocal than before Morsi was deposed. On Tuesday, an Iranian official said the Egyptian president had been elected by the will of the nation and called on the armed forces to "take heed of the vote of the people".