(FOXNEWS) — President Mahmoud Ahmadinejad’s visit to Cairo on Tuesday, the first by an Iranian leader in more than three decades, highlights efforts by Egypt’s Islamist leader to thaw long frigid ties between the two regional heavyweights.

Although the official welcome was warm, there was unscripted discord from Sunni protesters angry over Iran’s support for the regime of Syrian President Bashar Assad, as well as decades of sectarian animosity between Shiite-led Iran and the region’s Sunni majority.

Ahmadinejad was forced to flee an ancient mosque in downtown Cairo after a Syrian protester took off his shoes and threw them at him.

Later, anti-Iranian protesters raised their shoes up while blocking the main gates to Al-Azhar, the Sunni world’s most prestigious religious institution, where Egypt’s most prominent cleric chided Ahmadinejad for interfering in the affairs of Sunni nations.