Iraq's military admitted on Monday that "excessive force" was used in a district of the capital overnight where a mass protest led to clashes that medics and security forces said left 13 people dead.
"Excessive force outside the rules of engagement was used and we have begun to hold accountable those commanding officers who carried out these wrong acts," the military said in a statement.
It was the first time since protests broke out on Tuesday that security forces acknowledged using disproportionate measures, while protesters had accused them of firing live rounds directly at them.
Hundreds had gathered overnight in Sadr City, a densely populated district in eastern Baghdad where state security forces are rarely seen.
On videos distributed on social media of the late-night rally, protesters ducked in streets littered with burning tires as heavy gunfire was heard.
Security sources and medics said the clashes left 13 people dead overnight.
In a statement distributed to journalists on Monday morning, the Iraqi military said Prime Minister Adel Abdel Mahdi had ordered "all army units to withdraw from Sadr City to be replaced with federal police units."
He called on all forces to abide by the "rules of engagement" in dealing with rallies, it added.
This comes after a week of violence gripping Iraq has left more than 100 dead and thousands wounded.
In his only address to the protesters last week, Abdel Mahdi had insisted security forces were acting "within international standards" in dealing with demonstrations.
Monday's order for the withdrawal of the army from Sadr City appears aimed at calming tensions in the neighborhood, where a populist Shiite cleric enjoys wide support.
The unrest is the most serious challenge facing Iraq, two years after the victory against ISIS militants.
Iraq's national security adviser vowed to fight attempts to "bring down the Iraqi state." Falih al-Fayadh said an ongoing investigation will prove who was behind the violence in Baghdad and predominantly Shiite southern provinces.