BAGHDAD—With traffic on the Republic Bridge snarled up for half a mile and lunchtime fast approaching, the two pickup trucks chock full of armed men in desert camouflage decided they could stand the wait no longer. Mounting the sidewalk, they sent pedestrians scattering as they barreled towards one of the many checkpoints designed to stymie Islamic State (ISIL) suicide bombers in the Iraqi capital.

Up ahead, the nervy gaggle of policemen and soldiers manning the concrete barriers heard the commotion and leapt to their feet, ready to do battle. But when they saw that the lead vehicle flew not the black banner of ISIL but the telltale green flag of the Asaib Ahl al-Haq militia (AAH), they lowered their weapons and scuttled out of the way.

AAH is one of some 35 Shi’ite militias that coalesced to fight ISIL as it swept across large stretches of northern and western Iraq last summer. The Iraqi government narrative suggested they would disperse when the Sunni jihadists were finally defeated. But the militias’ role in the fighting has emboldened them. And few are now betting against the militias’ longevity—especially after the key city of Ramadi fell back into ISIL hands a few days ago.

“They’re not just going to melt away. They are here to stay.”

“They’re not just going to melt away. They are here to stay,” said Sajad Jiyad, an Iraq analyst and researcher based between Baghdad and London. “There will be some kind of reward for their service to the state.”

That might seem only fair for fighters who took part in some of the fiercest combat and sustained serious casualties. The problem is that many of the militias, with their estimated 100,000 men under arms, haven’t exactly endeared themselves to the population.

“It’s fitting that we send our brutes to fight their barbarians,” one shopkeeper in Baghdad’s upmarket Karrada district mumbled, shortly after another convoy of militia SUVs hurtled down her street.

Militiamen in Basra, Iraq’s second city, deep in the Shia-majority south, have been accused of demanding “protection money” from businesses. Some of their colleagues in the north are said to have carried out atrocities or looting after re-taking mostly Sunni areas around Tikrit.

Reuters/Ahmed Jadallah Fighting for God, not the government.

Senior militia figures, unsurprisingly, deny such claims. I met Sheikh Abu Samir al-Mayahi, who leads the Basra operations of the powerful Badr Organization, outside its well-fortified local headquarters on the city’s outskirts. Billboards on most street corners implored young men to join up, saying “Will you sacrifice your soul to defend our country and our holy places?”

Al-Mayahi suggested that allegations of theft by his men were insulting and implausible. “When the leader of Badr sleeps in the mud with his men, who give their blood for Iraq, why do you think they’ll become thieves the next day? You believe that fighters in Ramadi will go to the effort of hauling fridges back down to the south?”

But at least some militiamen and militia-affiliated figures seem to labor under the delusion that, despite Iraq’s sectarian disputes, Sunni Iraqis will welcome the Shi’ite militias who push into their territories with open arms. Jomaa al-Atwani, a former member of Iraq’s parliament and commentator on al-Etejah TV (a station aligned with Lebanon’s Shi’ite party, Hezbollah), said: “When Popular Mobilization Committees [as the militias prefer to be called] stand with their Sunni friends and sacrifice their blood to liberate their country, this is a great opportunity for Iraq to heal.”

“America and Europe are behind ISIL… Is it surprising now that we don’t welcome their help?”

Militia leaders—many of whom took the lead in fighting US troops after Saddam Hussein was toppled—are also only too willing to trot out wild anti-Western conspiracy theories. “America and Europe are behind ISIL, so of course they are strong,” said Faleh al-Khazali, another member of parliament, and commander of the Kata’ib Sayyid al-Shuhada, another militia. “Is it surprising now that we don’t welcome their help?”

None of this has diminished their enthusiasm for American, British and German military gear, though. A veritable cottage industry of army surplus stores has sprung up to cater to the militias in Baghdad’s Bab al-Sharqi district. Several dozen businesses do a roaring trade doling out bulletproof vests, uniforms, and webbing. Iranians and Lebanese Hezbollah fighters are among their best customers, store owners say.

“Whenever there’s war, we flourish, but with the militias, things have been very good,” said Ali Mohammed, whose shop sits across from the old bombed-out Ministry of Youth and Sport. “Some buy for themselves, others donate the cash for other fighters to pick up the required gear.”

Even here, though, the militias have shown themselves unwilling to play by the rules. The authorities, intent on preventing more jihadists from buying official uniforms and passing themselves off as soldiers to carry out attacks, used to demand the names of the shops’ customers. But since the militiamen are often unwilling to identify themselves, all attempts at oversight have collapsed.

“They defended our holy places so it’s only appropriate that they be celebrated.”

Many militiamen also believe they’re the victims of a concerted effort to tar their image. In a bid to set out their side of the story, their social media activists are busy disseminating a stream of counter-information.

Hunched over a computer, Bilal Ahmed, who leads the 13-man Team Media War outfit, is one of the most vigorous defenders of the militias’ record. In between batting ISIL “fanboys” across the internet and facilitating foreign correspondents’ trips to the front lines, he ensures the team’s 400,000 Facebook followers are kept up to date with a steady flow of videos.

Their clips are slick—interspersing scenes of ISIL atrocities, helpless civilians, and determined young men flocking to militia training camps—but they also reflect an often nakedly sectarian view of Iraq’s future that is hard to reconcile with their professed desire for unity.

“The Popular Mobilization Committees saved Iraq, and have become an essential part of the country’s infrastructure. They defended our holy places so it’s only appropriate that they be celebrated,” Ahmed said.

The authorities in Baghdad aren’t blind to the dangers of untrammeled militia power.

Despite a few setbacks earlier in the year, ISIL remains a formidable power. Its seizure a few days ago of Ramadi illustrated once more the ineptitude of the Iraqi army: Deprived of US airstrikes (after sandstorms reduced visibility), the Iraqi troops collapsed against a numerically inferior group. With no other fighting forces to turn to against ISIL, few people wish for the militias’ imminent demise. But it’s clear that they too could end up as an obstacle to Iraq’s stability.

The authorities in Baghdad aren’t blind to the dangers of untrammeled militia power. In an effort to coopt them and maintain a veneer of state control, most have been incorporated into the official Popular Crowd Authority. They now have an authorized chain of command and a set budget of $830 million for 2015.

There are plans afoot, too, to merge many of the militias into the security forces, or into a new national guard. With the prospect of increased official recognition, some militias appear to have toned down their rhetoric and made moves to recruit small numbers of Sunni fighters.

But, keen to keep some personnel to preside over their private operations, they’re unlikely to commit their full manpower to the government forces, says Jiyad, the UK and Iraq-based analyst. “What will happen is that some of the more powerful militia groups will allow 70-80% of their fighters to go into the state, to be part of the army, but they’ll request that 20-30% of their guys stay to preserve their identity and to man their bases,” he said.

And for as long as the militias preserve a measure of independence, some analysts believe they’ll remain a vehicle for hardline elements within the Iranian military to retain their influence in Baghdad.

The militias’ operational head “is basically a fully paid up member of the Revolutionary Guard in Iran.”

The militias’ operational head, Abu Mahdi al-Mohandes, was listed as a “specially designated global terrorist” by the US after he spearheaded some of the deadliest assaults on US troops after the invasion. “He’s basically a fully paid up member of the Revolutionary Guard in Iran,” said Michael Knights, an Iraq expert and fellow at the Washington Institute for Near East Policy. “Do you want a new permanent armed force in Iraq led by a US designated global terrorist that does not perhaps answer to the national command structure and that has an intimate relationship with the intelligence services of the neighboring country?”

Militiamen themselves are somewhat divided as to what their post-ISIL role ought to be. “The Iraqi army will be in charge of the borders, we and police will keep the peace in the cities,” said Bilal Ahmed. Higher-ranking officials are often more circumspect. “We are a political organization. We will go back to building people in Iraq,” Badr’s Sheikh al-Mayahi said.

But he too hinted that his group retains a strong strand of independence. “You have to remember,” he went on, “ultimately when we work, we don’t work for government. We work for God.”