Iran President Ahmadinejad begins historic Egypt visit
Mahmoud Ahmadinejad has become the first Iranian president to visit Egypt since the Islamic revolution in 1979.
Mr Ahmadinejad is in Cairo for a summit of the Organisation of Islamic Co-operation, which begins on Wednesday.
After arriving on Tuesday, he discussed with Egyptian President Mohammed Morsi ways to end the bloodshed in Syria and strengthen relations, officials said.
Mr Ahmadinejad was later warned by Egypt's top Sunni Muslim cleric not to meddle in the affairs of Gulf states.
Grand Sheikh Ahmed al-Tayeb of al-Azhar said Iran should not to seek the "extension of Shia reach" and should "respect Bahrain as a sisterly Arab state", according to a statement issued by al-Azhar's media office.
The Islamic republic has been accused by Bahrain's Sunni-led government of fomenting unrest among its majority Shia community.
The president was also told by the head of al-Azhar that Sunnis living in Iran should be guaranteed full rights.'Pave the ground'
Diplomatic ties between Egypt and Iran broke down in 1980 after the former signed a peace treaty with Israel and gave asylum and a state funeral to Iran's exiled Shah Reza Pahlavi. In 1981, Iran named a street in Tehran after the assassin of Egyptian President Anwar Sadat.
Egypt's President Mohammed Morsi welcomed Mahmoud Ahmadinejad on a red carpet at Cairo airport. The two men first met at a Tehran summit last year. This visit began with talks on the Syrian crisis and how to improve bilateral ties between Egypt and Iran.
Although this visit has been officially described as "routine", its significance will not be lost on Egypt's allies in the West and elsewhere in the region. They have differences with Iran over its nuclear programme and its influence in Syria and over Shia Muslim groups, including Hezbollah in Lebanon.
Mr Morsi has indicated his desire to turn a new page in Egyptian foreign affairs. However, he is likely to tread cautiously in forging a new relationship with Iran. At home, al-Dawa al-Salafiya (The Salafist Call), a leading ultraconservative Islamist group, has advised him to put the interests of Sunni Islam first, and members of the president's Muslim Brotherhood movement have expressed their own concerns.
Relations between the regional powers have improved since Egyptians elected an Islamist head of state in June.
However, they remain at odds over several issues, including Syria, which was suspended from the OIC at its last summit despite Iranian objections.
"I will try to pave the ground for developing co-operation between Iran and Egypt," Mr Ahmadinejad was quoted as saying by Iran's state news agency, Irna, before leaving Tehran.
"If Tehran and Cairo see more eye-to-eye on regional and international issues, many [issues] will change," he added.
But Egyptian Foreign Minister Mohamed Kamel Amr said any improvement in ties would not come at the expense of relations with Gulf Arab nations - Iran's regional rivals.
"The security of Gulf countries is a red line for Egypt," Mr Amr added, according to the AFP news agency.
Mr Ahmadinejad's visit follows one to Tehran by Mr Morsi for a summit of the Non-Aligned Movement in August, when the two leaders agreed to reopen embassies.
As the most populous Arab country and a historic regional heavyweight, Egypt, a predominantly Sunni power, has in the past seen itself as a political rival of Shia Iran, says the BBC's Yolande Knell in Cairo.
Some analysts have expressed concern over the apparent decision of the new Islamist leader to reconnect with Iran, our correspondent adds.
They note that Tehran hailed Egypt's uprising two years ago, which forced President Hosni Mubarak to resign, as an "Islamic awakening".
President Morsi is hosting the OIC summit following days of nationwide protests by opposition supporters in which nearly 60 people have died.
Meanwhile, Mr Ahmadinejad has criticised the Iranian judiciary's decision to arrest a close ally, former Tehran prosecutor Saeed Mortazavi.
No reason has been given for the detention of Mr Mortazavi, though reports suggest it may be linked to a long-running dispute between the president and the speaker of parliament, Ali Larijani.