Iraqi Prime Minister Haider al-Abadi announced on July 9 "victory" over Islamic State Iraq and the Levant (ISIL) in the city of Mosul, his office said.
"The commander in chief of the armed forces (Prime Minister) Haider al-Abadi arrived in the liberated city of Mosul and congratulated the heroic fighters and the Iraqi people for the great victory," said a statement from his office.
The defeat was the biggest yet for ISIL 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.
The Iraqi forces launched their campaign to recapture Mosul in October, and since then ISIL 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 U.S.-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 look to be coming to an end.
"An announcement is imminent," Brigadier General Robert Sofge told AFP by phone.
"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 jihadists that 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 that remain are "desperate".
The general said some jihadists 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 close 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.
Iraq's Counter-Terrorism Service, which has spearheaded the assault, said the jihadists now only held a band of territory 100-150 meters 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 first began on October 17, 2016 and the fight grew tougher when Iraqi forces entered the warren of narrow alleys in the densely populated Old City.