Iraq will imminently announce a final victory in the nearly nine-month offensive to retake Mosul from Islamic State, a US general said, as celebrations broke out among police forces in the city.

The defeat would be the biggest yet for Isis in the three years since it seized Mosul in a lightning offensive, swept across much of the country’s Sunni Arab heartland and proclaimed a caliphate straddling Iraq and Syria.

Iraqi military spokesman, Brigadier General Yahya Rasool, told state TV on Sunday that 30 militants had been killed attempting to escape the battlefield by swimming across the Tigris river.

Iraqi forces launched their campaign to recapture Mosul in October, and since then Isis has gone from holding the entire city to being trapped between security forces and the Tigris River on its western side.

Backed by a ferocious aerial bombing campaign by a US-led international coalition, the offensive has turned much of the city to rubble and forced tens of thousands of people to flee.

Diehard jihadists have been putting up fierce resistance in recent days but their efforts to keep the Iraqi troops at bay seem to be coming to an end.

“An announcement is imminent,” Brig Gen Robert Sofge said on Saturday. “I don’t want to speculate if it’s today or tomorrow but I think it’s going to be very soon,” he added.

The jihadis who remain in Mosul are fighting to the death in a tiny area of just two blocks of the Old City next to the Tigris, Sofge said, and those who remain are “desperate”.

The general said some jihadis were trying to blend in with fleeing civilians by shaving their beards and changing their clothes, others were playing dead then detonating explosive vests as Iraqi forces closed in.

Women had blown themselves up amid throngs of displaced civilians.

“They are doing as much damage as they can during these final moves,” Sofge said.

An Iraqi Special Operation Forces (ISOF) soldier fires at an Islamic State militant in the Old City district where remaining Isis fighters continue to fight. Photograph: Martyn Aim/Corbis via Getty Images

Iraq’s counter-terrorism units, which have led the assault, said the jihadis only held a band of territory 100-150 metres (109-164 yards) deep and 300 metres wide.

“The end of the battle is near, I would say two days, but it could go on,” said CTS commander Abdel Ghani al-Assadi.

The battle for Mosul began on 17 October 2016 and the fight grew tougher when Iraqi forces entered the warren of narrow alleys in the densely populated old city.

Slowing the advance toward the final holdouts, Isis fighters have placed booby traps and bombs in structures they occupied. “The enemy has strung IEDs (improvised explosive devices) all over the place, in every place, in every closet, in one case under a crib,” said Sofge.

A final victory in Mosul would be a milestone for the Iraqi security forces, which had crumbled in the face of an Isis onslaught across Iraq in 2014. “They deserve every bit of a celebration and pride and sense of accomplishment that a military force can feel,” said Sofge.

“This fight in Mosul is not like anything modern militaries have done in our lifetime. You have to go back to the second world war to find anything that’s even close.”

The Iraqi prime minister, Haider al-Abadi, declared on Twitter late last month that “we are seeing the end of the fake state”.

That claim was made after Iraqi forces retook what remained of Mosul’s al-Nuri mosque and the adjacent al-Hadba minaret.

Isis’s leader, Abu Bakr al-Baghdadi, declared himself “caliph” at the mosque in his only public appearance in 2014. But Isis blew the two landmarks up on 22 June, in what Abadi said was “an official declaration of defeat”.

In Mosul on Saturday, jubilant interior ministry forces – whose mission has been declared over – were seen flashing victory signs and posing for selfies in front of each other holding Isis’s notorious black flag upside down.

But others were not celebrating as the fighting continued and distraught women and children emerged covered in dust and clutching what few belongings they could carry.

More than 60 women and children were in tears after escaping, having lost loved ones in the crossfire, coalition bombing, jihadi shelling and sniper fire.

Civilians escape the fighting in the remains of Mosul’s old city, where Isis fighters have made their last stand in the city. Photograph: Martyn Aim/Corbis via Getty Images

Hungry and haggard, they said they had spent months being held as human shields by the jihadis. One group of jihadis tried to escape across the Tigris river from west Mosul but were killed by the Iraqi forces, a senior commander said on Saturday. “Some of them tried to cross to ... the far bank [of the river] but we have forces there,” said Staff Lt Gen Abdulghani al-Assadi, a senior commander in Iraq’s elite counter-terrorism service.

The jihadis wanted to go back but security forces “fired on them and killed them,” he said, without specifying how many died.

Iraq’s Joint Operations Command said 35 Isis members were killed and six captured trying to escape “the advance of our forces” in the old city.

The recapture of Mosul will not, however, mark the end of the threat posed by Isis, which holds territory elsewhere in Iraq and carries out frequent bombings in government-held areas.