Islamic State militants threw themselves into the River Tigris on Sunday, trying to flee the battlefield in Mosul as they faced imminent defeat by Iraqi forces fighting to dislodge them from their last pocket in the city.
A U.S.-trained elite Iraqi force in the Old City of Mosul reached the Tigris riverside, state TV said, indicating that the insurgents' last redoubt is on the verge of falling.
After eight months of combat that has ruined parts of the city, killed thousands of civilians and displaced nearly one million people, Iraqi officials say victory is close.
The militants have been driven from all but a patch of territory on the western bank of the Tigris bisecting Mosul, where they have staged a last stand in the narrow alleys of the Old City.
Plumes of smoke rose over the Old City on Sunday and the decaying corpses of Islamic State group fighters lay in the streets. Scattered bursts of gunfire could be heard and several airstrikes were carried out.
Iraqi military spokesman, Brigadier General Yahya Rasool, told state TV earlier on Sunday that 30 militants had been killed attempting to get away by swimming across the Tigris.
Later, Iraqiya News ran and on-screen headline saying: 'Forces from the Counter Terrorism Service raised the Iraqi flag on the Tigris river bank in the Old City of Mosul."
Islamic State group vowed on Saturday to "fight to the death" in Mosul.
Cornered in a shrinking area of the city, the militants have resorted to sending women suicide bombers among the thousands of civilians who are emerging from the battlefield wounded, malnourished and fearful.
The battle has also exacted a heavy toll on Iraq's security forces.
The Iraqi government does not reveal casualty figures, but a funding request from the U.S. Department of Defense said the Counterterrorism Service, which has spearheaded the fight in Mosul, had suffered 40 percent losses.
The United States leads an international coalition that is backing the campaign against Islamic State group in Mosul by conducting airstrikes against the militants and assisting troops on the ground.
The Department of Defense has requested $1.269 billion in U.S. budget funds for 2018 to continue supporting Iraqi forces.
Without Mosul - by far the largest city to fall under militant control - Islamic State group's dominion in Iraq will be reduced to mainly rural, desert areas west and south of the city where tens of thousands of people live.
It is almost exactly three years since the ultra-hardline group's leader Abu Bakr al-Baghdadi proclaimed a "caliphate" spanning Syria and Iraq from the pulpit of the medieval Grand al-Nuri mosque.
Prime Minister Haider al-Abadi declared the end of Islamic State group's "state of falsehood" a week ago, after security forces retook the mosque - although only after retreating militants blew it up.
The United Nations predicts it will cost more than $1 billion to repair basic infrastructure in Mosul. In some of the worst-affected areas, almost no buildings appear to have escaped damage and Mosul's dense construction means the extent of the devastation might be underestimated, U.N. officials said.
The militants are expected to revert to insurgent tactics as they lose territory.
The fall of Mosul also exposes ethnic and sectarian fractures between Arabs and Kurds over disputed territories or between Sunnis and the Shia majority that have plagued Iraq for more than a decade.