CAIRO (AP) — Egypt's President Mohammed Morsi will attend a summit in Iran later this month, a presidential official said on Saturday, the first such trip for an Egyptian leader since relations with Tehran deteriorated decades ago.

The visit could mark a thaw between the two countries after years of enmity, especially since Egypt signed its 1979 peace treaty with Israel and Iran underwent its Islamic revolution. Under Morsi's predecessor Hosni Mubarak, Egypt, predominantly Sunni Muslim, sided with Saudi Arabia and other Sunni-dominated Arab states in trying to isolate Shiite-led Iran.

Until now, contacts have been channeled through interest sections, a low-level form of diplomatic representation. In May last year, Egypt, which was ruled by an interim military council, expelled a junior Iranian diplomat on suspicion he tried to set up spy rings in Egypt and the Gulf countries.

It's too early to assess the implications of the visit or to what extent the Arab world's most populous country may normalize relations with Tehran, but analysts believe it will bring Egypt back to the regional political stage. The visit is in line with popular sentiment since Mubarak's ouster in an uprising last year for Cairo to craft a foreign policy independent of Western or oil Gulf countries' agendas.

"This really signals the first response to a popular demand and a way to increase the margin of maneuver for Egyptian foreign policy in the region," said political scientist Mustafa Kamel el-Sayyed. "Morsi's visits ... show that Egypt's foreign policy is active again in the region."

"This is a way also to tell Gulf countries that Egypt is not going to simply abide by their wishes and accept an inferior position," he added.

The official said that Morsi will visit Tehran on Aug. 30 on his way back from China to attend the Non-Aligned Movement Summit, where Egypt will transfer the movement's rotating leadership to Iran. He spoke on condition of anonymity because he was not yet authorized to make the announcement.

Story continues

The trip is no surprise — it came days after Morsi included Iran, a strong ally of Syrian Bashar Assad, in a proposal for a contact group to mediate an end to Syria's escalating civil war. The proposal for the group, which includes Egypt, Saudi Arabia and Turkey, was made at the Organization of Islamic Cooperation summit in Saudi Arabia's holy city of Mecca.

During the summit, Morsi exchanged handshakes and kisses with Iranian President Mahmoud Ahmadinejad, in their first meeting since Morsi assumed his post as Egypt's first elected president.

The idea was welcomed by Iran's state-run Press TV, and a leading member of Egypt's Muslim Brotherhood said that Tehran's acceptance of the proposal was a sign Egypt was beginning to regain some of the diplomatic and strategic clout it once held in the region.

After the fall of Egypt's longtime strongman Hosni Mubarak in last year's popular revolt, officials have expressed no desire to maintain Mubarak's staunch anti-Iranian stance.

Last July, former Egyptian foreign minister Nabil Elaraby, who also heads the Arab League, delivered a conciliatory message to the Islamic Republic, saying "Iran is not an enemy." He also noted that post-Mubarak Egypt would seek to open a new page with every country in the world, including Iran.

Tensions have not been absent however in contacts with Iran's clerical state since Egypt's uprising. When a delegation of politicians and youth activists made a visit to Iran last year, one Egyptian pro-democracy activist, Mustafa el-Nagger, said his Iranian hosts claimed the revolt sweeping the Arab world was part of an "Islamic awakening." He responded with a different interpretation: the anti-Mubarak uprising was "not a religious revolution, but a human evolution."

Any normalization between the two countries would have to be based on careful calculations.

Majority Sunni Egypt has its own suspicions of Iran on both religious and political grounds. The country's ultraconservative Salafis and even the moderate consider Shiites heretics and enemies.

Since splitting from their Sunni brethren in the 7th century over who should replace the Prophet Muhammad as Muslim ruler, Shiites have developed distinct concepts of Islamic law and practices.

They account for some 160 million of the Islamic world's population of 1.3 billion people, and make up some 90 percent of Iran's population, over 60 percent of Iraq's, and around 50 percent of the people living in the arc of territory from Lebanon to India.

In 2006, Mubarak angered Shiite leaders by saying Shiites across the Middle East were more loyal to Iran than to their own countries. His view was shared by other Arab leaders and officials, including Jordan's King Abdullah II who warned of a Shiite crescent forming in the region.

"The old regime used to turn any of his rivals to a ghost. We don't want to do like Mubarak and exaggerate of the fear of Iran," said Mahmoud Ezzat, deputy leader of the Muslim Brotherhood, of which Morsi was the leader of its political arm.

"But at the same time, we should not take the Iranians' ambitions lightly. As much as they don't want us to interfere in their business, we don't want them to interfere in our business," he said, mentioning his group's opposition to Iran's "grand project to spread Shiite faith."

While nearly three decades of Mubarak rule left Egyptians inundated with state-spun scenarios of Iranian plots aiming to destabilize the country, many sympathize with Iran's Islamic revolution and consider Tehran's defiance of the United States a model to follow. Others seek a foreign policy at the very least more independent of Washington.

A new understanding with Iran would be a big shake-up for a region that has been split between Tehran's camp — which includes Syria and Islamic militias Hezbollah in Lebanon and Hamas in Gaza — and a U.S.-backed group led by Saudi Arabia and rich Gulf nations.

To add another level of complexity, there is also the fact that Islamic militant group Hamas, which rules the Palestinian enclave in the Gaza strip to the frustration of neighboring Israel, is a historical offshoot of the Muslim Brotherhood, the dominant force in Egyptian politics since Morsi's election.

Aware of the Gulf states' anxieties over the rise of political Islam in post-Mubarak Egypt, Morsi has focused on courting Saudi Arabia. He visited it twice, once just after he won the presidency, and a second time during the Islamic summit. In an attempt to assuage fears of the Arab uprisings by oil monarchs, he vowed that Egypt does not want to "export its revolution". He has also asserted commitment to the security of Saudi Arabia and its Gulf Arab allies, a thinly veiled reference to the tension between them and Iran.