Egypt's president is under sharp criticism for his domestic policies. But his actions on the international stage have drawn praise. Iran is particularly pleased about warming relations - and has the most to gain.
When Mohammed Morsi was elected as Egypt's president in June 2012, the regime in Tehran was quick to send congratulations. After years of icy ties under Hosni Mubarak, Iran finally saw the opportunity to get on better terms with the regional Arab heavyweight. The prominence of Morsi's Muslim Brotherhood raised hopes among the regime in Iran of an "Islamic Awakening."
"Iran sees the Arab Spring as an opportunity to promote its own revolutionary Islamic vision for the region," Elizabeth Iskander, research fellow at the German Institute for Global and Area Studies in Hamburg, told DW. However, this is proving to be an illusion.
Morsi has his own agenda to follow when it comes to foreign policy. His first visit abroad after taking office was to Saudi Arabia, one of Cairo's significant financial supporters since the Arab Spring. But Morsi also played a key role in brokering a cease-fire between Israel and Gaza last month and was showered with praise by the US.
"What Morsi is doing is to be statesman-like and trying to boost Egypt's position in the region," said Dina Esfandiary, Research Associate at The International Institute for Strategic Studies in London. "He wants to re-elevate the country to be taken seriously in the region but also aims to keep everyone happy."
Iran's efforts to seek closer ties included an invitation to the Summit of the Non-Aligned Movement (NAM) it was hosting in Tehran in August as it took over the rotating leadership. It is customary for the country holding the NAM presidency - in this case Egypt - to hand over the reigns personally to the successor, which was Iran. The invitation put Morsi in a difficult position. After all, Egypt is heavily depending on aid from the West.
The Non-Aligned Movement (NAM) - a group of states which are not aligned formally with or against any major power bloc - currently has 120 members
"But Morsi also understands that Iran is an important country," Esfandiary told DW. Only at the last minute did Egypt confirm that Morsi would attend the NAM summit - for a mere four hours on his flight back from China. He then proceeded to sharply criticize Syria, a key ally of Iran, in his statement at the opening of the summit, calling for Syria's President Bashar Assad to step down. By doing so, Morsi made it clear that he would neither befriend nor alienate Iran.
"It would have been more pointed to not attend at all," Esfandiary said. Morsi's attendance showed he wanted to be taken seriously on the international stage. "If you just look at his foreign policy, not his domestic actions, it's about not picking a side, being the go-between and demonstrating that Egypt is a strong player."
A difficult balancing act
Furthermore, Morsi is keen to distinguish himself from his predecessor, Hosni Mubarak. No Egyptian leader had personally visited Iran since the mid-1970s. For decades, the predominantly Sunni Muslim Egypt had considered itself as a political rival of Shia Iran. Under Mubarak, relations with Iran's ally Syria, as well as the Lebanese Shia group Hezbollah, were strained.
"Egypt is showing: we will talk to those Mubarak wouldn't talk to. We are not at America's beck and call," Rouzbeh Parsi, Senior Research Fellow at the European Union Institute for Security Studies in Paris, told DW. "Morsi doesn't feel a compelling need to get too friendly with the Iranians, but needs to show that he's different from Mubarak. It's a balancing act, but he doesn't want to sway so strongly to Iran and endanger Western support either."
In addition, Morsi is fully aware that he requires backing from Saudi Arabia, which is very hostile toward the Muslim Brotherhood - hence, his first visit abroad to the kingdom.
"Iran is a competitor for Egypt in terms of securing a hegemonic role in the post-Arab Spring Middle East," Iskander said. "Morsi prioritizes relations with other Arab states, particularly Saudi Arabia, over relations with Iran. Saudi Arabia's strongly Sunni politics and hostility toward Shia Iran means that Egypt cannot openly court relations with Iran without damaging relations with Arab Gulf states."
Iran to benefit more
While analysts agree that Morsi's actions are image-driven, Iran certainly has more to gain by grasping the Egyptian president's outstretched hand.
"Iran is very isolated at the moment; most of its allies are dropping like flies and the situation in Syria isn't helping," Esfandiary said. "Iran is keen to have friends and allies in the region and to be taken seriously. So there are political clout and economic advantages to gain by a rapprochement with Egypt."
In addition, she said, the closer ties to Egypt send a signal to the West from Tehran. "It says: we aren't alone, despite your sanctions," Esfandiary said. "Iran is the bigger winner in the relationship rather than Egypt."
With the situation in Syria deteriorating, Iran may not be able to maintain its regional clout solely through its proxies Hezbollah and Hamas. And Tehran knows that Egypt could bring it in from the cold.
"Iran is conducting Realpolitik," Parsi said. "For Iran, taking Egypt - being a major Arab country - out of the column of hostile countries makes life easier."
However, despite the positive political rhetoric, the ties between Iran and Egypt are little more than symbolic at this point. They could, though, develop into something more solid should they prove useful for other regional challenges, such as finding a lasting solution to the conflict in Syria.
Each week DW brings you personal stories from around the globe.