At least 50,000 civilians are believed to remain in ISIL-held pockets of Mosul, with Iraqi forces advancing quickly.

The battle to wrest full control of the Iraqi city of Mosul from the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group will be over in a few days, according to the Iraqi military.

Lieutenant-General Abdul Ghani al-Assadi, commander of the Counter-Terrorism Service (CTS) in Mosul, said on Monday that units were battling ISIL fighters among the narrow alleyways of the historic Old City.

An attempted fightback by ISIL failed on Sunday night and the group’s hold on the city, once its de facto capital in Iraq, was weakened, a senior commander said.

“Only a small part [of the fighters] remains in the city, specifically the Old City,” Assadi told Reuters news agency.

“From a military perspective, Daesh [ISIL] is finished. It has lost its fighting spirit and its balance. We are making calls to them to surrender or die.”

As CTS units battled fighters in the densely populated maze of tiny streets of the Old City, which lies on the western bank of the Tigris river, Assadi said the area under ISIL control in Mosul was now less than 2sq km.

He also predicted Mosul will fall “in very few days”.

Up to 350 fighters are estimated by the Iraqi military to be besieged in the Old City, dug in among civilians in crumbling houses and making extensive use of booby traps, suicide bombers and sniper fire to slow down the advance of Iraqi troops.

More than 50,000 civilians, about half the Old City’s population, remain trapped behind ISIL lines with little food, water or medicines, according to those who escaped.

READ MORE: Iraqi artist depicts life under ISIL

A US-led international coalition is providing air and ground support in the eight-month-old offensive.

The fighters last week destroyed the historic al-Nuri Mosque and its leaning minaret from which their leader Abu Bakr al-Baghdadi declared a caliphate spanning parts of Iraq and Syria three years ago.

The mosque’s grounds remain under the militants’ control.

Iraqi troops captured the neighbourhood of al-Faruq in the northwestern side of the Old City facing the mosque, the military said on Monday.

Iraqi forces took the eastern side of Mosul from ISIL in January after 100 days of fighting and started attacking the western side in February.

Assadi said Iraqi forces had linked up along al-Faruq, a main street bisecting the Old City, and would start pushing east, toward the river.

“It will be the final episode,” he said.

Aid organisations say ISIL has stopped many civilians from leaving, using them as human shields. Hundreds of civilians fleeing the Old City have been killed in the past three weeks.

ISIL has carried out sporadic suicide bombings in parts of Mosul using sleeper cells.

It launched a wave of such attacks late on Sunday, trying to take control of a district west of the Old City, Hay al-Tanak, and the nearby Yarmouk neighbourhood.

Security forces were searching the two neighbourhoods house to house, as a curfew was still in force over parts of western Mosul, witnesses said.

OPINION: The human shields of Mosul

Social media carried posts showing black smoke and reports that it came from houses and cars set alight by the fighters.

Some of the residents who had fled the fighting returned to areas where the curfew was partially lifted, witnesses said.

The authorities did not confirm a report by Mosul Eye – an anonymous blogger who supplied information on the city during the fighters’ rule – that 12 civilians had been killed in the attacks.

The fall of Mosul will be a big setback for the armed group, but ISIL remains in control of large areas of both Iraq and Syria.

ISIL’s Baghdadi has left the fighting in Mosul to local commanders and is assumed to be hiding in the Iraq-Syria border area. There has been no confirmation of Russian reports over the past days that he has been killed.

In Syria, ISIL’s former stronghold is nearly encircled by a US-backed, Kurdish-led coalition.

Defeat predicted

The offensive to retake Mosul, in northern Iraq, was launched eight months ago with air and ground support from a US-led international coalition.

Brigadier-General Mohammed al-Khodari of the Iraqi army told Associated Press news agency that counterattacks were tactics the Iraqi army had seen in other areas that were previously recaptured from ISIL.

“When they sense defeat somewhere, they counterattack somewhere else to draw away attention and to show that they are still strong,” said Khodari.

“This attack shows that they will soon be defeated in Mosul.”

Hundreds of civilians fleeing the Old City have been killed in the past three weeks.