Iran's influence is looming large as Iraqis prepare to head to the ballot box for parliamentary elections next month, with many in the country worried that Tehran may be seeking to strengthen its political grip in Baghdad.
Iranian support and military advisers helped Baghdad's Shiite-led government beat back ISIL. But with the insurgents now largely defeated militarily, Iran's political clout has emerged as a divisive issue ahead of the polls.
That influence has sowed fear among Iraq's disenchanted minority Sunnis, who bore the brunt of the war's destruction, and has also caused concern in Washington. Despite tensions between the United States and Iran, both remain allies of Iraqi Prime Minister Haider Al Abadi's government.
US Defence Secretary Jim Mattis last month accused Iran of "mucking around", saying that America has "worrying evidence" that Iran is funnelling "not an insignificant amount of money" into Iraq to try to sway votes. Baghdad rejected the accusation, saying the use of foreign money in domestic politics "is illegal and unconstitutional".
Iran and Iraq are Shiite-majority countries, sharing deep economic and cultural ties — as well as a 1,500-kilometre (900-mile) border.
But they fought a war in the 1980s that left hundreds of thousands dead. Iranian influence in Iraq has grown steadily since the 2003 US-led invasion that toppled long-time dictator Saddam Hussein, marking the start of a prolonged period of sectarian division, extremist violence and political strife.
Under Saddam, many of Iraq's Shiite political elite spent years in exile in Iran. Since Saddam's fall, Iraqi markets have been stocked with Iranian goods and millions of Iranian pilgrims descend on Iraq each year to visit holy shrines in the cities of Samarra, Baghdad, Najaf and Karbala.
When entire divisions of Iraq's military disintegrated following the fall of the city of Mosul to ISIL in the summer of 2014, Iranian influence soared.
Weeks before the US began a bombing campaign against ISIL, Iranian advisers and support for Iraqi Shiite militias, which became known as Popular Mobilisation Units, became instrumental in halting the insurgents' advance that had come dangerously close to Baghdad.
More than 500 members of the paramilitary forces or political figures associated with the militias are now running for parliament.
Ahmed Al Asadi is one of the candidates with strong paramilitary ties. An elected member of parliament from Baghdad and former spokesman for the PMU, he cut ties with the force before launching his re-election bid — a formality required by a governing body overseeing the May vote.
"Iran is the ally of the powerful forces that supported Iraq against terrorism," he said, dismissing concerns that Tehran plays a destabilising role in Iraq.
But other Iraqi politicians worry that if a large number of men such as Mr Al Asadi win seats in parliament, Iraq will be even more beholden to its eastern neighbour.
Saleh Al Mutlaq, a longtime Iraqi politician and former deputy prime minister, said he expects candidates with ties to the Shiite militias to do well in the poll.
"These elections will be disastrous for this country," he said. "The PMU will be a key player in the political process and this will give Iran a role and a word in forming the government and in choosing a prime minister."
Iran is not the only one trying to influence the May vote, said Joost Hiltermann, a longtime Iraq researcher with the International Crisis Group.
"Everybody is trying to buy or gain influence, anybody who has a stake in Iraq that is, whether they do it with money or intimidation or other kinds of incentives," he said. "Ever since there have been elections in 2005, there's been meddling."
The future of American forces in Iraq hinges in large part on who becomes Iraq's next prime minister and who gets to lead the country's most powerful ministries.
While the Shiite militias racked up several early victories against ISIL, it was US-led coalition air strikes that allowed Iraqi forces to retake urban areas. Iraq remains deeply dependent on US military aid, training and intelligence sharing.
While Mr Al Abadi, who is seeking re-election with his recently formed Victory Alliance party, has said he is open to long-term American training programmes for Iraqi forces, some of his opponents have taken a much harder line in describing any US forces in Iraq as occupiers.
The US still has more than 5,000 troops in the country supporting its fight against ISIL, most significantly along Iraq's volatile border with Syria, in western Anbar province and around the city of Kirkuk — areas that have seen an increase in militant activity.