In a darkened living room in the Shiite neighborhood of Sadr City, a gray-haired militia commander picked up his phone Friday to read a text message from one of his colleagues on the battlefield.

“Captured six ISIS members in an ambush,” it said, referring to militants from Islamic State of Iraq and Syria, an al-Qaeda splinter group whose advance over the past 10 days has nearly brought the Iraqi state to its knees. “At dawn I killed two, four I gave to the army.”

The message was an example of what members of Iraq’s Shiite militias describe as growing cooperation with the country’s army. As Iraq spirals into chaos, Prime Minister Nouri al-Maliki is now relying on the militias, which once carried out hundreds of attacks on U.S. soldiers, to help him cling to power.

The lines between Shiite militias and the Iraqi armed forces have been increasingly blurred since the withdrawal of U.S. troops in 2011. Now, as the ISIS threat reinvigorates militias and the United States dispatches 300 military advisers to the fracturing country, the overlap is raising questions about increased American support for Iraqi forces.

“Potentially what this could amount to is the U.S. arming or advising Iranian proxies, some of which are on the terror list,” said Phillip Smyth, a researcher at the University of Maryland specializing in Shiite Islamist groups.

How the Islamic State is carving out a new country

Speaking in London, retired Gen. David H. Petraeus, the former head of coalition forces in Iraq, raised similar concerns on Wednesday. “This cannot be the United States being the air force of Shia militias,” he said of potential U.S. strikes on ISIS targets in Iraq.

The Obama administration is acutely conscious that any direct intervention in the current Iraqi conflict could be interpreted as taking the side of Maliki’s Shiite-dominated government in what is rapidly becoming a sectarian war. Every U.S. statement and announcement since the crisis began has included a warning that decisions to provide further substantial military assistance, including airstrikes, will depend upon the extent to which Iraq’s government reaches out to all religious and ethnic groups.

Asked Wednesday if the administration was concerned that Iran had called for Shiite militias to protect religious shrines in Iraq, White House press secretary Jay Carney said that ISIS was “a common threat to the entire region, including Iran, but Iraq will only successfully overcome this threat by governing in a non-sectarian manner, building and investing in the capacity of Iraq’s security forces and addressing the legitimate concerns of Iraq’s Sunni, Kurd and Shia communities.”

The Iraqi government denies that it allows militias to work within its ranks. But since an estimated 90,000 soldiers shed their uniforms and abandoned their posts as ISIS swept across northern Iraq this month, it has called for new “volunteers” to join the armed forces. That call was followed by a religious decree last week from Iraq’s top Shiite cleric, Grand Ayatollah Ali Sistani, who called for all able-bodied Iraqis to take up arms against the insurgency.

In his decree, Sistani urged volunteers to join the regular security forces, a stipulation he reiterated on Friday, saying weapons should remain in the hands of the state.

But many have joined militias instead, as the ISIS sweep, combined with the cleric’s call to arms — even with its stipulations — spawns a resurgence of the irregular Shiite armies which hunted down Sunnis during the bloodiest years of the Iraq war.

While most disbanded, some groups, such as the Iran-backed Asaib Ahl al-Haq and Kitaeb Hezbollah, which is designated as a terrorist organization by the United States, have remained active since the U.S. withdrawal and have slowly built their presence in the security forces for years. Smyth described their infiltration as “systemic,” raising the possibility that U.S. advisers might soon be working alongside militiamen who once fought them.

The Sadr City commander, who spoke on the condition of anonymity for security reasons, is a follower of firebrand Shiite cleric Moqtada al-Sadr, who last week announced the formation of “peace brigades” to repel ISIS attacks on the Shiite-majority country’s shrines and holy sites.

The brigade is ostensibly a defense force, although the commander’s message from his colleague on the front lines near Samarra, about 80 miles north of Baghdad, pointed to a more active role. The commander said the new group is effectively a reincarnation of the Mahdi Army, Sadr’s paramilitary force, whose military activities were frozen in 2008.

While Sadr’s followers are in the process of organizing, Asaib Ahl al-Haq, which killed and kidnapped numerous American soldiers before the U.S. withdrawal, says it is already actively working within the security forces. The ISIS advance has only strengthened that role, members said.

“It’s changed things for the better,” said Mohanad Dihleh, 29, an Asaib fighter who was reclining on cushions on the floor of his living room in Sadr City. “Morale is high.”

The paramilitaries work in close coordination with the armed forces, wear their uniforms and effectively work as a forward strike force, according to a spokesman for Asaib.

“They are fighting side by side with the government forces on all fronts,” said Ahmed al-Kinani, a spokesman for the group’s political wing. “They wear military uniforms. They are working with the security forces. It’s logical.”

He listed the areas where they are present: in Samarra, protecting the city’s holy shrine; farther north in Saddam Hussein’s home city of Tikrit; and in Mosul province, where ISIS began its lightning advance.

The Iran-backed militias’ forces have been hardened on the battlefield in Syria, where they have been fighting to shore up President Bashar al-Assad. Among Iraqis, they have a fearsome reputation.

Kinani denied accusations that his men played a role in the mass killings of Sunnis in a jail near Baqubah last week. But under the cloak of the security forces, their operations remain hard to track and any atrocities further sully the image of Iraq’s armed forces, already rejected by many Sunnis in the country’s west as a sectarian force.

Saad Maan, a spokesman for Iraq’s Interior Ministry, said that there is no place for militias to operate within the security forces, but that no individuals would be turned away.

“Of course, the most important thing is that we have thousands of people coming to be volunteers with the Iraqi army,” he said. He said that militiamen who enlist are not allowed to operate outside the umbrella of the armed forces.

“We treat them all as individuals. We don’t see them as Mahdi Army or Asaib Ahl al-Haq. We don’t let them work as groups,” Maan said, estimating that more than 40,000 had signed up in the past week.

An influx of religiously motivated recruits and a resurgence of militias at a time of worsening sectarian conflict has raised concern about the potential for an incident that ignites a new round of Sunni-Shiite bloodletting.

Tribal leaders in Sadr City have been gathering names of recruits. Among them is Nihad Shehab, 32, a former bus driver who said he volunteered for the army three days ago in response to Sistani’s call. Unlike more experienced fighters and militiamen, who have already been dispatched to the front lines, he’s still waiting to be called up.

“I’m not afraid, because this is jihad,” he explained. “When I die, I will be a martyr.”

Karen DeYoung in Washington contributed to this report.