Iraqi counterterrorism troops work on getting a Humvee ready to go back into combat in West Mosul on Sunday. (Thomas Gibbons-Neff/The Washington Post)

MOSUL, Iraq — The last handful of neighborhoods held by the Islamic State in Mosul will likely be the most difficult to retake despite nearly eight months of street-by-street fighting, the U.S. officer in charge of advising Iraqi forces in the area predicted.

It’s going to be “extremely violent,” Col. Patrick Work, commanding officer of the 2nd Brigade, 82nd Airborne Division, said during a phone interview Saturday. Work is in charge of about 1,800 soldiers who are helping “advise and assist” the Iraqi forces around Mosul.

“The hardest days are still in front of them,” he said.

Mosul is a critical prize in the fight against the Islamic State. It was once the main urban stronghold for the militants in Iraq and the logistics base for atrocities across northern Iraq, including purges against the Yazidi minority and the destruction of renowned pre-Islamic antiquities.

Work declined to give a timeline for the remainder of the operation in the western part of the city, but some Iraqi officers have said the battle could be over by the end of the week in conjunction with the start of Ramadan, a holy month of fasting, introspection and prayer.

Yet with some of the most difficult areas of the city still held by militants — and tens of thousands of civilians still trapped in their homes — the fighting could last well into the weeks ahead.

“It all depends on the circumstances of the battle. Now they are entirely besieged, and there is no way out. It’s going to be either fighting or giving up and trying to infiltrate with the civilians,” said Lt. Gen. Sami al-Aridhi, commander of two of the U.S.-trained Counter Terrorism Service task forces. “I can’t give timelines, but I don’t expect it’s going to be long.”

Iraqi forces are now wrapping up the final stages of an operation, launched earlier this month, in which they retook nearly all of the northwestern part of Mosul. An earlier offensive that started in February stalled after coming up against heavy resistance in the southern part of the city.

The Iraqi military is usually mum about its casualty numbers, but Marine Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, said Friday that the Iraqis had suffered heavy losses during the Mosul operation, with about 980 killed and more than 6,000 wounded.

The Islamic State holds only about five square miles of Mosul, including the Zanjili neighborhood and the Old City. The Old City is the site of the Great Mosque, where the Islamic State’s leader, Abu Bakr al-Baghdadi, declared a “caliphate” in 2014 across parts of Iraq and Syria.

Both Zanjili and the Old City are far more cramped that the rest of Mosul, with narrow side streets and alleys that will restrict Iraqi vehicle movement and give Islamic State fighters a clear advantage when it comes to launching their signature bomb-laden suicide vehicles.

The close quarters will probably force Iraqi troops to rely more heavily on their own resources rather than U.S.-led airstrikes and artillery. Aside from airstrikes, U.S. and other coalition forces are providing a range of other assistance to Iraqi forces, including flying small hand-launched drones to help spot targets for advancing forces, as well as providing counterartillery radar and drone-jamming equipment to stop the Islamic State’s own unmanned aircraft.

It is unclear how many fighters are left in the city or what type of resources they still have at their disposal. Work declined to give an estimate, while Iraqi Counter Terrorism officers have said they believe about 350 fighters remain in the Old City and its surrounding neighborhoods.

“Measuring exact numbers of ISIS fighters left in Mosul is difficult, and it may not really matter,” Work said, adding that Iraqi gains in the city are more important to the coalition than tracking militant numbers.

[How a woman in England tracks civilian deaths in Syria, one bomb at a time]

Despite being on the defensive for more than half a year and losing hundreds of fighters, the Islamic State has still managed to launch small-scale offensives in parts of the city.

On Friday, dozens of Islamic State fighters attacked Iraqi Counter Terrorism troops during a sandstorm, pushing the Iraqis back about a block before retreating as the weather changed. On Sunday, Iraqi Counter Terrorism forces continued to face staunch resistance in the Najjar neighborhood despite having declared their part of the Mosul operation over the day before. While it has not been officially announced what Iraqi units will clear the remaining parts of Mosul, Iraqi Counter Terrorism officers said they would clear the Old City. It is likely, however, that the Iraqi army, Federal Police and the Ministry of Interior’s Emergency Response Division will all be involved in the final operations.

With an estimated 200,00 civilians still in the Islamic State-held portions of the city, the wave of new fighting could touch off a humanitarian crisis.

Work said the U.S.-led coalition is cautious when calling in air and artillery strikes, but he noted that it is ready to look at additional ways to mitigate civilian deaths during the final stages of the battle. In March, the United States admitted bombing a building in the Jadida neighborhood of Mosul. More than 100 people were killed in the blast, and the U.S.-led coalition is still investigating the incident. Iraqi Counter Terrorism forces said they had called in the strike.