Iran’s President Mahmoud Ahmadinejad had high hopes for the visit to Tehran by new Egyptian President Mohamed Morsi. His trip on Thursday for the Non-Aligned Movement (NAM) summit might have been brief — his spokesman emphasized ahead of time that he would spend only four hours on Iranian soil, including getting stuck in traffic — but Iran’s leaders relished the opportunity to demonstrate progress in overcoming its isolation in the Arab world and to gain some democratic and revolutionary legitimacy by proxy.

Worried that Morsi’s visit would indeed bestow such a diplomatic blessing on Tehran, the New York Times for example, sternly advised him to get briefed on the events of 2009, when the Iranian regime crushed the Green Movement by killing and imprisoning demonstrators demanding reform — the same kind of uprising that brought Morsi to power in Cairo. But Morsi’s performance in Tehran disappointed his Iranian hosts as cruelly as it mocked those who warned that his visit would deliver Egypt into Iran’s camp and reveal a radical new Egyptian foreign policy.

When Morsi spoke at NAM, he vocally and directly sided with the Syrian opposition against Iran’s ally Syrian President Bashar al-Assad. “Our solidarity with the struggle of the Syrian people against an oppressive regime that has lost legitimacy is an ethical duty as it is a political and strategic necessity,” he said, prompting Syrian officials to walk out of the summit in protest. Sitting directly beside Ahmadinejad, Morsi said: “I am here to announce our full and just support for a free, independent Syria that supports a transition into a democratic system and that respects the will of the Syrian people for freedom and equality at the same time, preventing Syria from going into civil war or going into sectarian divisions.”

Despite Morsi’s harsh comments, however, the Iranian media barely mentioned them.

This came as no surprise. Ever since Morsi announced he would make the trip to Tehran, Iran’s propaganda machine had been working overtime and it could hardly afford to back down now. Iranian state media has gone out of its way to exaggerate the importance of Morsi’s trip by publishing frequent updates during his brief visit. The two countries broke off diplomatic relations after former President Anwar Sadat signed the 1979 peace agreement with Israel, and Egypt gave refuge in Cairo to the ailing Shah, when he was deposed by the Islamic revolution. Morsi’s visit is the first by an Egyptian president since then.

The state-owned media sought to paint a rosy picture of the future in Egypt-Iran relations, implicitly portraying the reconciliation as a defeat for Israel and as a victory for what Tehran continues to quixotically dub the “Islamic Awakening.” Fars News, an agency affiliated with the Islamic Revolutionary Guard Corps (IRGC), published a piece written by an Iraqi journalist, which argued that Morsi’s trip to Tehran is a sign that Egypt is “turning its back on America and Israel.” The article continued to highlight the supposed anti-Western nature of the trip by adding, “Iran and the entire freedom-loving people of the world are awaiting for Morsi’s trip to Tehran. [His trip] will remind everyone of the enduring refusal of the Islamic world against dictated policies of Americans and their Western allies.” For the past week, the Iranian media has combed through any interviews, articles, or opinion pieces that have declared the summit and Morsi’s trip as a watershed moment. Fars News has published statements by the Syrian parliament, declarations by Pakistani newspapers, an interview by an obscure university professor from Tunisia, and a few opinion pieces by Egyptian pundits, all making the same point: the summit is a success and Morsi’s trip declares Iran the winner in the war against the West.

Ahmadinejad has gone to great lengths to convince the world that restoring diplomatic relations with Egypt has become a fait accompli. Ahmadinejad has offered aid and even his personal assistance: “Personally, I am ready to work in an Egyptian factory until Egypt is freed from the current (economic) conditions,” he said in an interview with the pro-Saudi newspaper, Asharq al-Awsat. “Re-establishing ties between the two countries will certainly take place. There is no other way,” he added. Ahmadinejad even offered to trade in his annual New York visits to the U.N. General Assembly for Egypt. “I prefer to…fly across the Egyptian sky rather than travel several times to the U.S.”

Morsi’s decision to take the opportunity offered by Iran to embrace the Syrian uprising against Assad therefore put the Iranian regime in something of a bind. Morsi refused even to say clearly if relations with Iran will be upgraded, but he has said he will pursue a more balanced foreign policy with many states, including Iran. A leaked memo issued by the Ministry of Culture and Islamic Guidance on August 26, which issued strict instructions to the media banned them from publishing: “Any potential devilish comments about issues pertaining to Egypt, Bahrain and Syria.” The memo (published on various Iranian opposition websites) effectively censored the media from publishing anything negative about the NAM summit.

Iran’s exaggeration of the state of its relations with Egypt and frustration with Morsi’s speech at the summit reflects broader concerns about its place in the changing Middle East. Despite their optimistic rhetoric, Iranian officials realize now that they are likely to gain far less than they had hoped from the Arab uprisings. As their ally Syria crumbles and the Gulf Cooperation Council (GCC) becomes increasingly hostile, Egypt could be its best and only hope for a new Arab friend in the short-term.

But Egypt is less interested in playing along. Not only are the two countries seriously divided over the Syria crisis, but the cost of restoring ties with Iran for Egypt would be great. Not only would this alienate the United States and Israel, but also relations with Gulf states, particularly Saudi Arabia, would be severely damaged. And Morsi clearly understands the importance of maintaining good ties in the Gulf — aid is at stake. In fact, his first diplomatic mission after he became president was to Saudi Arabia on July 10. The purpose of the visit was to secure aid to replenish Egypt’s diminishing currency reserves. Iran, faced with crippling international sanctions, would find it hard to compete with the Saudis in the economic aid arena.

Considering Iran is the greatest supporter of the Assad regime, it is highly unlikely Cairo and Tehran will restore relations anytime soon. Not only Morsi, but the Muslim Brotherhood has also stated its unequivocal support for the Syrian opposition. In an interview with the Egyptian newspaper, Al-Ahram, Mahmoud Ghozlan, a spokesperson for the Muslim Brotherhood, defended Morsi’s trip to Tehran, stating: “It’s better for Morsi to travel to Tehran and tell the Iranian officials that they are making a mistake regarding the Syrian people…this trip is an attempt to put pressure on Iran to stop its support for the Syrian regime. Egypt will not normalize relations with Iran at the cost of Syria and Persian Gulf security.” Regarding the prospects of restoring the diplomatic relations between Egypt and Iran, Ghozlan told another newspaper, “We were looking forward to enhancing our cooperation with Iran, but with the current Iranian stance, it is impossible. Syrian blood is not cheap.”

Iran has already declared victory based upon Morsi’s visit. But it is not much of a victory, certainly not outside of Iran’s carefully controlled media. Tehran’s desperation for a relationship with a disinterested Egypt speaks volumes about its declining place in the hearts of the Arab world.

Geneive Abdo is the director of the Iran program at the Middle East Institute and Reza H. Akbari is a research associate for the program. Reza tweets under the handle @rezahakbari.