Iraq and Iran signed an agreement on Sunday to boost military cooperation days after the US imposed new sanctions against Tehran for its "malign" activity in the region.
The agreement to help “combat terrorism” was signed a day after the Iraqi prime minister Haider Al Abadi said Shiite militias backed by Iran would remain an integral part of the state.
Iranian military advisers have played a key role in the campaign to drive ISIL from territory seized by the extremist group in 2014 and the militias, known as Hashed Al Shaabi, have also fought against the extremists along with Iraq’s regular military and police.
But the militias have been accused of abuses against Sunni populations in areas recaptured by government forces and there are fears over their future role in the country.
The agreement between Iran and Iraq, which extends “cooperation and exchanging experiences in fighting terrorism” was signed in Tehran by the Iranian defence minister Hossein Dehghan and his Iraqi counterpart, Erfan Al Hiyali.
The agreement also covered border security, logistics and training, the Iranian official news agency IRNA reported.
Since the 2003 US-led invasion of Iraq, Iran’s influence in the country has increased, empowering Shiite leaders and leaving Sunni populations neglected and resentful of the central government, which contributed to the rise of ISIL.
With the extremists defeated in Mosul, the last major city under its control, many Sunnis are fearful of a sectarian backlash as the country tries to rebuild.
The role of the Hashed Al Shaabi in Iraq has been an issue of widespread contention and will be a key issue in elections next year.
The government passed a bill in November that made the Hashed a legitimate entity of Iraq’s security forces and on Saturday Mr Al Abadi declared after meeting militias commanders that “the forces are an essential and neutral security entity and will remain within the structure of the Iraqi state”.
While maintaining that “the state is the main leader” of the security structure in the country, he said the Hashed “is a neutral security establishment, and it is here to stay”.
“It is our duty to protect it, because we are one," Mr Al Abadi added.
The announcement is the clearest sign of support from the prime minister for the Hashed’s continued role in Iraq after ISIL’s defeat. While his predecessor, Nouri Al Malaki, was widely condemned for his sectarian policies, Mr Al Abadi has been more conciliatory.
He has condemned sectarian violence carried out by the militias and tried to build ties with Sunni countries in the region. Last month, he travelled to Jeddah and met King Salman after the Saudi foreign minister visited Baghdad in February.
But the Hashed endorsement will raise concerns among Sunni leaders in Iraq.
Sarah Allawi, advisor to Iraqi vice president Ayad Allawi, said: “We thank the security forces for their efforts in liberating Mosul from ISIL - however we now are entering a new phase rebuilding Iraq post ISIL, which is aiming to achieve national reconciliation between political forces.”
The Hashed are an amalgamation of various subgroups with allegiances to Iran's supreme leader Ayatollah Ali Khamenei and Iraq's top Shiite clerics Ali Al Sistani and Muqtada Al Sadr, according to a report on the militias by the Carnegie Middle East Center.
“Some subgroups have assumed political roles and will seek to leverage their roles in combatting ISIL to win votes in Iraq’s 2018 elections,” said the report.
For militia members, the legitimacy of their struggle against ISIL is a direct result of a fatwa issued by Ali Al Sistani in response to the fall of Mosul in 2014 in which he called the fight a “sacred defence”.
“As of November 2016 and the passing of the Hashed Al Shaabi law, the Hashed has become a formally institutionalised part of Iraq's security apparatus tied to the office of the commander-in-chief,” said Fanar Haddad, senior research fellow in the National University of Singapore.
“However, unlike other security units, disbanding the Hashed would not be a straightforward administrative procedure given their immense popularity and legitimacy amongst many Iraqis and given the Hashed's powerful backers in Iraq and Iran”.
The Hashed’s role in defeating ISIL has also given them support from other sections of Iraq and not just Shiites.
“The fact is that the Hashed will be a permanent feature of Iraq’s social, political and military landscapes for the foreseeable future,” Mr Haddad added.