Igor Kossov

Special for USA TODAY

IRBIL, Iraq — Iraqi Prime Minister Haider Al-Abadi arrived in Mosul Sunday to celebrate with troops for their victory over the Islamic State after an eight-month grueling battle for control of the city.

Despite ongoing fighting with the last remnants of Islamic State fighters who previously vowed to fight to the death, al-Abadi “arrived in the liberated city of Mosul and congratulated the heroic fighters and Iraqi people for the great victory,” the prime minister's office said in a statement.

The Islamic State, also known as ISIS, now controls less than a square mile in Mosul’s Old City, but is using human shields, suicide bombers and snipers in the final fight, the Associated Press reported.

A military spokesman, Brig. Gen. Yahya Rassol, told state TV that 30 militants had been killed as they tried to flee by swimming across the Tigris River. In the final days, ISIS sent increasing numbers of suicide bombers to attack Iraqi troops and the remaining civilians fleeing the city.

"At this point, they all start to bomb themselves, men and women," said Lt. Gen. Abed al Hagani al Asadi of the Iraqi special forces.

While ISIS fighters remain in Iraq, a majority of them are concentrated in the city of Tal Afar, nearly 40 miles west of Mosul, as well as rural areas throughout northern Iraq, according to the Iraqi special forces.

ISIS sleeper cells remain concealed among escaped civilians and in some liberated areas, who could potentially carry out attacks for weeks or months.

However, last month's raising of the Iraqi flag over the shattered al-Nuri mosque — where ISIS leader Abu Bakr al-Baghdadi in 2014 had declared his caliphate — symbolized that ISIS had lost its most important stronghold, along with thousands of fighters who tried to keep it under the militants' control.

Iraqi forces battled for about three months before capturing eastern Mosul, and another five months to gain control of the western part of the city — longer than the Iraqi military expected.

Thousands of civilians died at the hands of ISIS fighters and from coalition airstrikes and close to 1 million people were displaced. Half of eastern Mosul and the vast majority of western Mosul lie in ruins, according to the Nineveh provincial government.

"Mosul is completely destroyed," said Emad al-Rashidi, the adviser to the governor of Nineveh province.

Three-quarters of the roads, almost all the bridges and 65% of the electrical network have been destroyed, according to Asien Hamza, manager of Nineveh's reconstruction committee. In addition, much of the city's water infrastructure has been booby-trapped by the militants.

The city was once home to 1.8 million people, but more than 875,000 are displaced. Many can't return because their houses or livelihoods are gone.

Iraq now faces a tough road toward reconstruction and reconciliation, plus undoing the damage that ISIS left behind. But on Sunday, the forces that recaptured the bulk of the city felt justified to celebrate.

"ISIS is finished," said Commander Mohammed Tariq Ali of the army's 16th Division. "No more ISIS."

Fight against ISIS 'far from over' despite terrorist group's loss of Mosul