Though many of the militias were funded by neighboring Iran, they became a crucial part of the U.S.-led campaign to defeat the extremists.
That campaign all but ended last year with the defeat of Islamic State, but the Hashd is not demobilizing.
Instead, the militias have transformed themselves into a potent government institution, political entity and economic player whose strong ties to Iran are likely to complicate U.S. foreign policy in the region.
Iran was once a bitter enemy of Iraq. But since U.S.-led forces toppled Iraqi dictator Saddam Hussein in 2003, Iran has become an important trading partner that wields increasing influence.
A recent study commissioned by the U.S. Army concluded that “an emboldened and expansionist Iran appears to be the only victor” of the U.S.-led invasion.
In the run-up to Iraqi elections last May, the Iranian-backed militias spawned a political party called Fatah, or Conquest, which netted 54 seats in parliament — more than all but one other party.
That gave the militias the political wherewithal to turn the Hashd from a makeshift volunteer force into an official branch of Iraq’s armed services.
In November, parliament passed a law granting the Hashd’s 122,000 to 140,000 personnel wage parity with their counterparts in the Iraqi military along with many of the same benefits. The Hashd’s budget this year was doubled to $2 billion.
Last month, according to local media reports quoting key politicians and others, the Fatah party persuaded the government to give the Hashd control of the Mutassem Co., one of the largest state-owned construction contractors in Iraq. The Hashd intends to use its fighters to pour cement, pave roads and repair homes as part of the effort to rebuild the country after so many years of war.
Its growing influence has stirred fear in Washington that the Hashd could help Iran circumvent U.S. sanctions, which severely limit its ability to export its goods and do business with other countries.
The U.S. government also has reason to be concerned about its ability to maintain a military presence in Iraq.
President Trump said in an interview on CBS last week that he intended to keep U.S. troops at Asad Air Base, about 100 miles west of Baghdad, to keep an eye on Iran. His comments renewed calls by the Hashd to terminate the agreement that allows the U.S. to station 5,000 military personnel in Iraq.
“There are challenges before us that must be surmounted — the most important of which is the American presence,” Hadi Ameri, head of the Fatah alliance, told reporters in Baghdad.
Hakim Zamili, former head of parliament's security and defense committee, accused the government of being too weak to confront the militias and their growing economic might.
“If there isn’t decisive action by the government, then of course we can’t succeed and achieve what the Iraqi citizen is demanding in terms of unemployment, corruption and services,” he said.
Defenders of the Hashd contrast it with the Iraqi army of 2014, when many of its soldiers shed their uniforms and threw away their guns as Islamic State advanced.
When Grand Ayatollah Ali Sistani, a Shiite Muslim cleric and Iraq’s highest religious authority, issued a religious edict calling on every able-bodied man to defend the capital, hundreds of thousands left their jobs and joined new militias.
Others enlisted in existing factions, including League of the Righteous, the Badr Organization and the Hezbollah Brigades — all of which receive funding, training and equipment from Iran and are sworn enemies of the United States.
The militiamen participated in every major battle against the extremists even as the U.S., Iraqi politicians and others expressed misgivings about a Shiite-dominated force attacking Sunni Muslim areas.
Some also worked with Iran across the border in Syria, bolstering troops loyal to Syrian President Bashar Assad against his rebel enemies.
The U.S. and its coalition of 73 countries fighting Islamic State worked alongside the militias with the hope they would be disbanded after the fighting was over.
Iran “should respect the sovereignty of the Iraqi government and permit the disarming, demobilization, and reintegration of Shia militias,” the State Department tweeted in October.
Many of those militias still exist, even as the Hashd became a branch of the Iraqi military and some of its commanders were integrated into other defense agencies, including the Counter-Terrorism Service, a special operations force trained and equipped by the U.S.
Officially, the Hashd no longer has anything to do with the militias. But the line between the two is murky.
The Hashd still maintains many of its old bases and helps man military checkpoints.
Parliamentarians and security personnel have accused the Hashd and its former militias — which have created so-called economic offices — of imposing levies on commerce, using their influence to grab real estate or charge protection money for safe passage.
Ahmed Jabouri, a parliament member from the northwestern province of Nineveh, accused the provincial government of allowing “armed groups associated with the Hashd’s factions” to steal 70 to 100 tankers of crude oil a day from the town of Qayyarah. “The government is silent,” he said.
“Nineveh is being robbed in broad daylight.”
One researcher, who asked to withhold his name for reasons of security, estimated that one out of every 32 barrels of oil sold in the country benefited the coffers of militias such as the League of the Righteous.
In the Sunni-dominated regions near Iraq’s western and northern border, the militias have also made money by taking over old smuggling routes to ferry food, clothing and many other goods from Syria and Turkey.
“Before, Sunnis in west Iraq had to make deals with [Islamic State] to have goods coming through from Turkey or Syria. Now they're much better off making deals with the Hashd,” said one person close to both the Hashd and the Syrian government and who has brokered some of these deals. The source spoke on condition of anonymity for security reasons.
“Likewise there are specific factions that cooperate with Syrians to bring in Syrian products, such as fruit, vegetables, soaps and plastics,” the source said.
The Hashd’s plans to help rebuild the country have won praise in some quarters.
“Since there isn’t a whole lot of fighting to do, there’s an intention to expand beyond military and to use Hashd personnel to provide services,” said Ali Mawlawi, a political analyst at the Baghdad-based Bayan Center think tank.
“If you’ve got more than 120,000 people who can get things done much faster than others, and are a lot more versatile and dynamic, I think that has a public benefit,” he said.
A highly visible role in public works projects and other popular programs also has enormous benefit for the Hashd.
“Their aim is to entrench their patronage and social influence by creating a network of social service entities to go with their militia,” said Thanassis Cambanis, a senior fellow at the New York-based Century Foundation think tank.
He said the approach is similar to the model used in Lebanon by Hezbollah — the Iran-backed paramilitary group and political party — to exert power over the government there.
“If the state can’t build the highway and the Hashd can, what does that say about the state?” he said.