MOSUL // Iraqi prime minister Haider Al Abadi flew into Mosul on Sunday to declare victory in the nine-month-long battle to liberate the city from ISIL.
Mr Al Abadi "congratulated the heroic fighters and the Iraqi people for the great victory", his office said.
But when the prime minister arrived, fighting was continuing in the city's historic centre, where ISIL had mounted a desperate last stand in recent weeks and where a small pocket of resistance still held out.
The soldiers, who have been fighting in Mosul for months, were relieved that the extremists' self-declared caliphate had come to an end in Iraq's second-largest city.
"Its been tough," said Captain Usama of Iraq's 9th Armoured Division, speaking from a base under Mosul's fifth bridge, which sits next to the Old City. "We've been fighting not just in Mosul, but in other big battles like Ramadi and Fallujah."
"It's as good as done now, maybe one or two more streets," he said.
Around him, his men occasionally burst out into song as they fired celebratory shots in the air.
Iraq's military has suffered heavy losses in Mosul, and the battle to retake it has brought death and destruction on the city and its people.
The fighting has uprooted most of Mosul's inhabitants. About 900,000 people have been displaced, roughly half of the city's pre-war population, aid agencies estimate. Most are in squalid displacement camps nearby, suffering through sweltering summer heat.
Caught in the crossfire, thousands of civilians lost their lives in the fighting. ISIL prevented residents from escaping, and even herded villagers from nearby settlements into Mosul. The militants fought Iraqi forces from houses packed with terrified families, and the return fire and air strikes from the US-led coalition frequently killed civilians used as human shields by the extremist group.
Families crossing the front lines to reach safety were shot at by the extremists, who declared anyone leaving the areas under their control to be apostates. The decomposing bodies of men, women and children littered the open spaces of west Mosul and the narrow alleyways of the Old City that marked the no-man's-land in the brutal urban conflict.
As the noose tightened around them, ISIL fighters resorted to increasingly depraved tactics to inflict casualties on its advancing opponents. The extremists have driven hundreds of suicide car bombs into Iraqi lines since the campaign to liberate Mosul began in the city's eastern half in October. When the fighting shifted to the Old City, whose ancient streets are mostly too narrow for cars, female ISIL members hiding explosive belts under their abayas blended in with escaping civilians and blew themselves up when they reached Iraqi lines.
Soldiers told The National that one mother even strapped explosives to her children, and that the family of seven perished when they blew themselves up. The troops also said the foreign fighters and their wives are the most fanatical of the extremists. While Iraqi ISIL fighters often try to escape by blending in with civilians, foreigners are likely to be detected if they try to flee and tend to fight to the death.
"All the families now left in the Old City are Daesh. All the women who are coming out are with them. But what can we do, we treat them like all the other civilians," said Col Saed of the Iraqi army, speaking at a military base in the heavily destroyed district of Bab Sinjar, next to the Old City.
ISIL also increasingly resorted to the use of poison gas as it lost ground in west Mosul, and scores of Iraqi soldiers have arrived in field hospitals with burns on their bodies or damage to their respiratory systems.
The fight for west Mosul has been particularly intense. The city is bisected by the Tigris river, and the east bank was fully liberated by Iraqi forces in January. Since then, life has returned to east Mosul, where the scars of battle are healing fast, and busy traffic and bustling markets are testament to an astonishing revival.
Fighting got under way on the west bank in February, with the weakened Iraqi forces relying on air strikes and artillery support to make headway. Many neighbourhoods in the west, are heavily destroyed, and the scale of displacement has been far greater than on the other side of the river.
The UN predicts it will cost more than US$1 billion (Dh36.7m) just to repair basic infrastructure in Mosul, but the damage to housing and private property is likely to exceed even that figure.
ISIL still holds territory elsewhere in Iraq, including the towns of Tal Afar and Hawijah in the north and a stretch of territory in western Anbar province, and is able to carry out frequent bombings in government-held areas.
It also continues to hold significant territory in Syria, including the northern city of Raqqa, its self-declared capital where the US-backed forces are battling to oust the extremist group after penetrating the fortified historic centre.
* Additional reporting by Agence France-Presse.