Iran's top security official on Sunday signed a deal with Iraqi authorities for "protection" of their common border, the Iraqi prime minister's office said, months after Tehran struck Kurdish opposition groups in Iraq's north.
Iraq's autonomous Kurdistan region hosts camps and rear-bases operated by several Iranian Kurdish factions, which Iran has accused of serving Western or Israeli interests in the past.
In November, Iran launched cross-border missile and drone strikes against several of the groups in northern Iraq, accusing them of stoking the nationwide protests triggered by the death in custody last September of Iranian Kurdish woman Mahsa Amini.
Ali Shamkhani, who heads Iran's Supreme National Security Council, inked the deal with his Iraqi counterpart Qassem al-Araji during a visit to Baghdad, the statement said.
It comprises "coordination over the protection of common borders", and will also see the "strengthening of cooperation in several areas of security", the statement from the office of Prime Minister Mohammed Shia al-Sudani added.
Shamkhani denounced "vicious activities by counter-revolutionary elements" in northern Iraq, a reference to the Kurdish groups operating in the country, according to Iran's state news agency IRNA.
He said the agreement signed on Sunday "can completely and fundamentally end the vicious actions of these groups," which the Iranian government labels "terrorist."
After the Iranian strikes, Iraq in November announced it would redeploy federal guards on the border between Iraqi Kurdistan and Iran, rather than leaving the responsibility to Kurdish peshmerga forces -- a move welcomed by Tehran.
Factions based in Iraq's mountainous north have in the past waged an armed insurrection against Tehran, but in recent years their activities have declined and experts said they had ceased nearly all military activity.
Shamkani's visit coincides with the 20th anniversary of the US-led invasion of Iraq that toppled former dictator Saddam Hussein.
His fall gave birth to a political system that granted the Shiite majority dominance over politics.
Many of these Shiite factions -- including Sudani's backers in parliament -- are supported by Shiite-majority Iran. Relations between the two neighbours have grown ever-closer over the past two decades.
Baghdad had also played a role in mediating a reconciliation between Iran and regional rival Saudi Arabia, hosting several rounds of talks between the two since April 2021.
Riyadh and Tehran had cut all diplomatic ties in 2016 before a surprise Chinese-brokered reconciliation deal was announced earlier this month.
Shamkhani also met the governor of Iraq's central bank and the deputy minister of foreign affairs, according to IRNA.
Tehran is a key trade partner for Baghdad, which in turn is largely dependent on gas and electricity from Iran.