Iraq's Prime Minister Haider al-Abadi arrived in Mosul on Sunday to announce victory over Islamic State forces in the city.
"Al-Abadi said the battle is settled and the remaining pockets of ISIS are encircled in the last inches of the city," his media office said in a statement. "It is a matter of time before we declare to our people the great victory."
Sunday's events came three years after Mosul's abrupt fall to jihadists alerted the world to Islamic State's growing strength, territorial ambitions and barbarity, as Abadi travelled to the city to declare it liberated once more.
''We are glad to see life back to normal for civilians in Mosul and all that was a result of the sacrifices of our heroes who amazed the world with their bravery,'' Abadi said in a Twitter posting.
Reports said residents danced and celebrated in the streets, honking horns, playing national music, raising Iraqi flags and spraying water on each other
The prime minister said the Iraqi military is fighting to free civilians whom ISIS is "using as human shields in approximately 50 to 100 houses".
Earlier on Sunday, he tweeted that he'd arrived in the "liberated city of Mosul" and "congratulates the heroic fighters and the Iraqi people in achieving this great victory".
Mosul is Iraq's biggest metropolis after Baghdad, and gaining control of the city was one of ISIS' most significant strategic wins.
The city is now a ruined shell of its former self, with the governor of Nineveh saying that destruction in the western side of Mosul is 30 times higher than the eastern side of the city.
Speaking to reporters after the reopening of the Khazir bridge that connects Erbil to Mosul which was blown up byISIS in 2014, governor Nofal al-Hammad said many houses and government offices have been destroyed in Mosul.
''The damage in the right bank, compared to the left bank is 30 times more,'' he said, ''I mean here the destruction of the city's infrastructure, the houses of the people, and the government offices.''
Three years of carnage
In 2014, Abu Bakr al-Baghdadi stood at the 12th century pulpit of the city's al-Nuri Mosque - since destroyed by his followers - and announced the creation of the so-called Islamic caliphate. It was the first and only time the leader of the terrorist group spoke publicly to his followers.
When the terror group seized Mosul in June of that year, it also took control of more than 2.5 million people and subjected some to horrors.
It beheaded people in public, threw gay men to their deaths from the top of buildings and made prisoners out of men who did not grow beards and women who did not wear Islamic clothing such as burqas.
In October last year, al-Abadi announced the start of the mission to retake Mosul, using a diverse coalition of about 100,000 troops.
As fighters flocked to Mosul, hundreds of thousands of residents fled, prompting a refugee crisis.
The city is also near some of Iraq's most vital oil fields, as well an oil pipeline that services Turkey. Securing these fields could bolster Iraq's economy and hit ISIS' finances hard, as the militant group sells oil illegally to fund its operations.
The Iraqi security forces' operation to retake the city began last October, and while no one was expecting the street-to-street battles to be easy, the fighting has dragged on for months.
First to fall was east Mosul, which was retaken in January. A second push, initiated in February, has focused on pushing remaining militants out of the west of the city.
Before ISIS seized control, Mosul was home to 2.5 million people. But hundreds of thousands fled as ISIS asserted their violent, extremist policies.
Since the start of the offensive to take it back, almost three-quarters of a million residents have fled. Many now languish in camps for Internally Displaced People (IDPs) or have fled the country entirely.