Islamic State fighters were battling to hold on to the last few streets under their control in the Old City of Mosul on Monday, making a doomed last stand in their former Iraqi stronghold.
In fierce fighting, Iraqi army units forced the insurgents back into a shrinking rectangle no more than 300 by 500 meters beside the Tigris river, according to a map published by the military media office.
Smoke covered parts of the Old City, which were rocked by air strikes and artillery salvos through the morning.
The number of Islamic State (IS) militants fighting in Mosul has dwindled from thousands at the start of the government offensive more than eight months ago to a mere couple of hundred now, according to the Iraqi military.
Iraqi forces say they expect to reach the Tigris and regain full control over the city by the end of this week. Prime Minister Haider al-Abadi is expected to visit Mosul to formally declare victory, and a week of nationwide celebrations is planned.
Mosul is by far the largest city captured by Islamic State. It was here, nearly three years ago to the day, that it declared the founding of its "caliphate" over parts of Iraq and Syria.
With Mosul gone, its territory in Iraq will be limited to areas west and south of the city where some tens of thousands of civilians live.
"Victory is very near, only 300 meters separate the security forces from the Tigris," military spokesman Brigadier General Yahya Rasool told state TV.
Abadi declared the end of Islamic State's "state of falsehood" on Thursday, after the security forces took Mosul's medieval Grand al-Nuri mosque.
It was from here that Islamic State leader Abu Bakr al-Baghdadi made his first and only video appearance, proclaiming himself "caliph" - the ruler of a theocratic Islamic state - on July 4, 2014.
With its territory shrinking fast, the group has been stepping up suicide attacks in the parts of Mosul taken by Iraqi forces and elsewhere.
On Sunday, a male suicide bomber dressed in a woman's veil killed 14 people and wounded 13 others in a displacement camp west of the capital Baghdad known as Kilo 60, security sources said. Islamic State claimed responsibility.
"The people who were attacked had fled to Kilo 60 for their safety. Many have travelled huge distances seeking help," Lise Grande, the United Nations' Humanitarian Coordinator for Iraq, said in a statement.
Islamic State said on Sunday it had carried out 32 suicide attacks in June in Iraq and 23 in Syria, of which 11 were on the US-backed Syrian Kurdish forces attacking its stronghold of Raqqa.
Iraqi state television said thousands of people had fled Mosul's densely-populated Old City over the past 24 hours.
But thousands more are believed trapped in the area with little food, water or medicine, and are effectively being used as human shields, according to residents who have managed to escape.
Months of grinding urban warfare have displaced 900,000 people, about half the city's pre-war population, and killed thousands, according to aid organisations.
Baghdadi has left the fighting in Mosul to local commanders and is believed to be hiding near the Iraq-Syrian border, according to US and Iraqi military sources.
The group has moved its remaining command and control structures to Mayadin, in eastern Syria, US intelligence sources have said.