A Syrian has tried to attack Iranian President Ahmadinejad in front of Al-Hussein mosque in Cairo, Turkey’s Anatolia news agency reports. The leader is in the Egyptian capital on a visit.

The video, taken by the news agency’s correspondent, shows a young man shouting at Ahmadinejad and trying to hit the presidents head with a shoe, instead striking one of his bodyguards.

The attacker, who attempted to hit President Mahmoud Ahmadinejad as he left a mosque, is reported to be a young man with “a Syrian accent”. Egyptian security forces managed to seize and arrest the man following the incident.

The attacker was heard chanting anti-Iranian slogans for supporting the Syrian government, the news agency noted.

The Iranian leader’s three-day visit has been described as the latest sign of improved relations between the two countries after the 2011 uprising that ousted Egypt’s longtime ruler, President Hosni Mubarak and brought an Islamist government to power.

Following his arrival, the Iranian president and his Egyptian counterpart held a 20-minute talk focusing on the civil war in Syria, AP reported quoting unnamed security officials. Historically, both countries have stood opposed on the question of Syria, with Iran being Damascus’ closest regional ally and Egypt supporting calls for Syrian President Bashar Assad to step down.

Mahmud Ahmadinejad arrived in protest-stricken Cairo to attend the Islamic Solidarity Organization conference. It’s the first visit of an Iranian leader to Egypt since 1979.