Iran condemned Sunday a recent Islamist militant attack on an army checkpoint in Egypt's North Sinai that killed a dozen Egyptian military personnel, the foreign ministry said.
Iran's foreign ministry spokesman Bahram Qasemi expressed "sympathy" with Cairo while stressing Tehran's "strong condemnation of terrorism and extremism in any country and by any group," according to Iran's Fars News Agency.
"Only unity between nations, international will and people's awareness and vigilance can combat the escalation of terrorist crimes and extremism targeting civilians and military in the region," Qasemi added.
On Friday, Islamist militants killed 12 members of Egypt's military in North Sinai and wounded six more in an attack on a checkpoint.
The military said it killed 15 militants in retaliation.
Tehran severed diplomatic ties with Cairo in 1980, a year after Iran's Islamic revolution, in protest at Egypt's signing of a peace accord with Israel and hosting of the deposed Iranian shah.
In 2012-2013, there was a brief thaw in relations between the two countries under Egypt's deposed Islamist president Mohamed Morsi.
Morsi made the first visit by an Egyptian leader to Iran in more than three decades in 2012. Iran's president at the time Mahmoud Ahmadinejad also visited Cairo in early 2013.
In March, Egypt's foreign minister, Sameh Shoukry, told the Saudi newspaper Okaz that the resumption of diplomatic relations between Cairo and Teheran is dependent on several factors, including a change of Iran's regional policy, respecting the independence and sovereignty of Arab states, and adopting a stance of non-inteference in the affairs of other states.