The Islamic State group has lost more than three-fourths of the territory it seized when it swept across Iraq in the summer of 2014, the Iraqi military said on Tuesday.

Brig. Gen. Yahya Rasool, a military spokesman, said the extremist group currently controls less than 30,000 sq km (12,000 sq. miles) in Iraq, or 6.8 percent of the country’s territory, down from more than 40 % at its height.

The extremist group has also lost ground in Syria, and is currently fighting U.S.-backed forces near Raqqa, the de facto capital of its self-styled Islamic caliphate.

Iraqi forces backed by U.S.-led airstrikes have gradually pushed the militants out of a string of towns and cities over the past two years, and are currently battling the extremists in Mosul, Iraq’s second largest city. Iraq declared eastern Mosul “fully liberated” in January, and Gen. Rasool said Iraqi forces have retaken more than half of the more densely populated western side.

“Our troops are very cautious in their advance,” Gen. Rasool told reporters in Baghdad. “The biggest challenge they face is the civilians.”

Col. John Dorrian, a U.S. spokesman for the coalition, said the fight for western Mosul has been “difficult.”

“The enemy’s tactics are not only hiding among the civilian population but also actively pulling civilians into harm’s way, surrounding their snipers with civilians, loading buildings that they are firing from with civilians and publicly executing civilians who are trying escape the danger,” he said.

Victory against IS has come at a staggering cost, with some towns and neighborhoods reduced to rubble by airstrikes and shelling. Hundreds of thousands of Iraqis have been displaced, and many have been unable to return even after the fighting because of demolished infrastructure and the lingering threat of attacks.