CAIRO (AFP) - Iran's President Mahmoud Ahmadinejad was told not to interfere in the security of Gulf Arab nations and to respect the rights of his country's Sunni minority as he began a landmark visit to Egypt on Tuesday.
Mr Ahmadinejad, the first Iranian president to visit Egypt in more than 30 years, was given a red-carpet welcome by Islamist President Mohamed Mursi but later chided by Egypt's top Sunni cleric.
Ahmed al-Tayyeb, the grand imam of Cairo's Al-Azhar, Sunni Islam's highest seat of learning, demanded "the Iranian president respect Bahrain as a brotherly Arab nation, and not interfere in the affairs of Gulf states".
He also denounced what he described as the "spread of Shiism in Sunni lands" and said Mr Ahmadinejad must uphold the rights of his Shi'ite-ruled country's Sunni minority.
Mr Ahmadinejad told a news conference at Al-Azhar that he "came from Iran to say that Egypt and the Egyptian people have their place in the heart of the Iranian people." "I hope this visit will be a new beginning for solidarity between our two people," he said.
Mr Ahmadinejad will attend a summit of the 57-member Organisation of Islamic Cooperation that opens Wednesday in Cairo to tackle crises ranging from the French-led battle against Islamist militants in Mali to the Syrian civil war.
The visit comes amid thawing relations between Egypt and Iran, which severed ties with Cairo in 1980, in protest over a peace treaty sealed between Israel and Egypt in 1979, the same year Iran's Islamic revolution toppled the pro-West shah.
Iran has been reaching out to Egypt since Islamists came to power in the wake of the 2011 revolution that ousted veteran president Hosni Mubarak, a staunch critic of Teheran.
Mr Mursi, who hails from the powerful Sunni Muslim Brotherhood, attended a Non-Aligned Summit in Iran, becoming the first Egyptian president to travel to Teheran since the 1979 Islamic revolution.
Mr Mursi discussed with Mr Ahmadinejad "ways to resolve the crisis and end Syrian bloodshed, without military intervention" and "ways to strengthen relations" between their countries, the official Egyptian MENA news agency reported.
Egypt and Iran stand on opposite sides regarding the conflict that has ravaged Syria for almost two years, leaving more than 60,000 people dead according to the United Nations.
Iran supports the regime of Syrian President Bashar al-Assad, while Egypt has been a leading voice urging his departure - along with regional heavyweights Saudi Arabia, Turkey and Qatar.
Mr Ahmadinejad alluded to their differences before leaving Tehran for Cairo.
"If Teheran and Cairo see more eye to eye on regional and international matters, many (issues) will change," he told reporters, according to Iran's official IRNA news agency.
Mr Mursi's government has shed some of the suspicion Cairo traditionally held towards Iran, but it also wants to assuage its rich Sunni-Muslim Gulf allies who accuse Teheran of plotting to undermine their regimes.
Foreign Minister Mohammed Kamel Amr was quick to reassure the energy-rich Gulf allies on Tuesday.
"Egypt's relations with any country will not be made at the expense of other countries' security," Amr told reporters. "We consider the security of Gulf states in particular a red line." Ties between Shi'ite Iran and the Sunni-ruled six-nation Gulf Cooperation Council - Saudi Arabia, Qatar, Bahrain, Kuwait, Oman, and the United Arab Emirates - have been strained since Gulf troops rolled into Bahrain in 2011 to help put down Shiite-led protests.
In December leaders of the GCC issued a statement saying they "reject and denounce" Iran's "continued interference" in their internal affairs.