MOSUL, Iraq (Reuters) - Iraq’s sectarian political leaders have plunged back into a dispute over the status of Shi’ite armed groups, undermining efforts to reunite the country as its troops press on with the assault of Mosul, Islamic State’s biggest stronghold.

Forty days into the biggest ground offensive in Iraq since the U.S.-led invasion of 2003, about a quarter of the city has been taken by U.S.-backed government units on the eastern side. The western part could prove far more dangerous, Major General Najm al-Jubbouri, one of the army’s top commanders, told Reuters.

Residents still wearing the long beards demanded by Islamic State welcomed Iraqi troops into a neighborhood of east Mosul with coffee, cheers and kisses after the fighters left.

“Today we have been released from prison,” said a resident, Ahmed Zeidan Mahmoud. “We were imprisoned. No water, no electricity, there was nothing.”

On the wall of a kindergarten, the faces of two girls were blotted out by militants who consider it un Islamic to depict people. Nearby, a dog was eating the corpse of a militant.

The slow progress was overshadowed by the sectarian political quarrel that erupted in Baghdad on Saturday when Shi’ite lawmakers forced a law through parliament legalizing the mainly Iranian-backed paramilitary units known as Popular Mobilisation forces.

Many Sunnis consider the paramilitaries to be sectarian militia and accuse them of having carried out abuses in Sunni areas recaptured from Islamic State. The Popular Mobilisation units deny having sectarian aims or committing widespread abuse and say they saved the nation when the army crumbled in the face of Islamic State’s lightning advance two years ago.

Sunni members of parliament boycotted the session held on Saturday, objecting to the existence of armed groups outside the army and the police, and worrying that Popular Mobilisation will enhance Shi’ite majority rule and Iran’s regional influence.

The dispute threatens to complicate efforts to pull the country back together and foster reconciliation when Mosul is captured, which would mark the effective defeat of Islamic State in Iraq.

Tanks of Iraqi army take part in an operation against Islamic State militants southeast of Mosul, Iraq November 26, 2016. REUTERS/Thaier Al-Sudani

The Iraqi military estimates there are 5,000 to 6,000‮‮ ‬‬insurgents in Mosul facing a 100,000-strong force made up of Iraqi government troops, Kurdish Peshmerga fighters and Shi’ite Popular Mobilisation units.

MANY DIFFICULTIES

The law voted on Saturday would turn the Popular Mobilisation units into a separate military corps, reporting to the prime minister. Under Iraq’s political system that splits top jobs between different communities, the prime minister is a member of the Shi’ite majority.

Sunni lawmakers plan to challenge the law in the federal court, one of them, Raad al-Dahlaki, told Reuters on Sunday.

Official status for the Shi’ite fighters could feed into the narrative of fear and resentment among Sunnis that helped Islamic State’s Sunni militants sweep to power in areas covering a third of Iraq in 2014.

After taking Mosul, the largest city in the north, the fighters declared a “caliphate” that also spans part of Syria. The group considers all Shi’ite Muslims to be heretics who must repent or die. But its violent rule has also antagonized Sunnis, raising hope for reconciliation among Iraq’s sects after the group is defeated.

“It won’t be rosy. Many difficulties,” said Major General al-Jubbouri, who is himself a Sunni, commenting on the sectarian system established post-Saddam Hussein.

“Some politicians will not like to change because many of them would lose their positions,” he said.

Islamic State fighters in Mosul are dug in among more than a million civilians as a tactic to hamper air strikes. They are resisting the advancing troops with suicide car bombs and sniper and mortar fire.

“If there weren’t civilians we’d be able to advance to the 4th bridge,” in southern Mosul, said Brigadier Gen. Mustafa Sabah from the 9th armoured division that is attacking from the south east.

He was referring to one of the strategic bridges across the Tigris river that splits Mosul west from east. U.S. strikes have hit four of the five bridges militants have been using to cross between the two halves of the city.

Iraq forces pushed deeper into eastern Mosul over the weekend, clearing out a residential apartment complex where residents welcomed them. The militants finally left after positioning themselves on the rooftops of three-storey apartment blocks.

One resident said the militants had tried to scare local people by telling them the army would rape their women.

In some parts of east Mosul there are signs of heavy fighting during the liberation but others are not damaged suggesting militants may have retreated.

Islamic State leader Abu Bakr al-Baghdadi, believed to be somewhere near the Syrian border, has told his fighters there can be no retreat from the city.

Mohammed Ahmed, an 18 year-old resident in Mosul’s Khadra district, said he heard one IS fighter shouting: “The angels are fighting with us. The angels are fighting with us.”