Mahmoud Ahmadinejad, the Iranian president, has discussed the Syrian conflict and other issues with Mohamed Morsi, his Egyptian counterpart, in an historic state visit to Cairo, state media reports.

Ahmadinejad flew into the Egyptian capital Cairo to attend a summit of the Organisation of Islamic Cooperation (OIC), which begins on Wednesday.

Morsi gave Ahmadinejad a red-carpet welcome on the tarmac at Cairo airport on Tuesday, shaking the Iranian's hand and exchanging a kiss on each cheek as a military honour guard stood at attention.

The two later held talks, discussing "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.

Ahmadinejad also met Ahmed al-Tayyeb, the head of the prestigious Sunni Muslim al-Azhar institute, on Tuesday.

Tayyeb told Ahmadinejad that his country must give full rights to Sunnis living in Iran and refrain from interfering in the affairs of Gulf Arab states.

Ahmadinejad will be holding meetings with several Egyptian officials and politicians during his three-day visit, the official IRNA news agency reported.

"I will try to pave the ground for developing co-operation between Iran and Egypt," he said before the trip.

Without elaborating, he said the visit would "definitely influence the bilateral ties" between the two countries.

Bilateral ties

Egypt has responded cautiously to Iranian efforts to revive ties since Morsi took power in 2012, with the two nations adopting opposing positions on the Syrian conflict.

Iran supports the government of Syrian President Bashar al-Assad, while Egypt has been a leading voice in urging his departure - along with regional heavyweights Saudi Arabia, Turkey and Qatar.

"If Tehran and Cairo see more eye to eye on regional and international issues, many [issues] will change," Ahmadinejad was quoted by IRNA as saying.

"If Tehran and Cairo see more eye to eye on regional and international issues, many [issues] will change"

- Mahmoud Ahmadinejad

Mohammed Amr Kamel, the Egyptian foreign minister, reiterated on Tuesday that "Egypt's relationship with Iran will never come at the expense of Gulf nations".

Al Jazeera's Rawya Rageh, reporting from Cairo, said that while the visit was important, it was difficult to see a substantial improvement in ties resulting from it.

"It is a very important visit, but for all intents and purposes it's dificult to see how this visit will lead to a full restoration of ties," she said, adding that there were still several key sticking points, not least of which is Iran's support for the Syrian government.

Iran severed ties with Egypt in 1980 in protest at a peace agreement between Egypt and Israel by then Egyptian President Anwar al-Sadat.

Ahmadinejad also expressed interest in visiting the neighbouring Gaza Strip.

Asked in an interview with Lebanon-based Al Mayadeen news channel whether he would visit Gaza next week while in Cairo or before his term as president expires in June, Ahmadinejad replied: "My wish is bigger than this. I wish to pray in Jerusalem after complete liberation."

"If they allow it, I would go to Gaza to visit the people," he said, without saying whose authority he would seek.

Iran does not recognise Israel.