Iraqi Prime Minister Haider al-Abadi was set to declare victory over Islamic State in Mosul on Monday as only a few dozen militants continued to put up resistance in the city that was the capital of their self-declared caliphate for the past three years.
However, the cost to civilians has been horrendous, with many thousands feared dead. Survivors are starving and traumatised, and large parts of the city have been destroyed.
Abadi has been meeting military and political officials in Mosul in a festive atmosphere which contrasted with the fear that quickly spread when a few hundred Islamic State militants seized the city and the Iraqi army crumbled in July 2014. Islamic State leader Abu Bakr al-Baghdadi instituted a reign of terror that eventually alienated even fellow Sunni Muslims who supported the group, handing an advantage to the security forces.
While defeat in Iraq's second-largest city will deal a heavy blow to Islamic State, the group controls several cities and towns south and west of Mosul.
Islamic State is also under heavy pressure in its operational headquarters in the Syrian city of Raqqa and its self-proclaimed caliphate that once straddled the two countries is crumbling.
The battle to dislodge the group from Mosul, which before the war had a large Christian population, took nine months. The United Nations says 920,000 civilians fled their homes since the military campaign began in October. Close to 700,000 people are still displaced and living in refugee camps.
'The fighting may be over, but the humanitarian crisis is not,' said UN Humanitarian Coordinator for Iraq Lise Grande.'Many of the people who have fled have lost everything. They need shelter, food, health care, water, sanitation and emergency kits. The levels of trauma we are seeing are some of the highest anywhere. What people have experienced is nearly unimaginable.'
Christian organisations active in helping Mosul refugees include World Vision, Samaritan's Purse, Open Doors and Christian Aid. World Vision's response manager Ian Dawes said: 'While some people see this as the end of a crisis, the work is really just beginning. The lives of children and their families have been torn apart after years of ISIL rule and months of fighting to retake the city. The level of destruction on all levels is immense.
'Before people return home, there will need to be reconstruction of homes and the most basic infrastructure like water and electricity while communities will also be in dire need of healing and reconciliation so that displaced people can return to their communities in peace. As well as supporting children in camps outside Mosul, we're working in the city to renovate schools and empower teachers so children have the infrastructure as well as emotional support they will need to get back to restart their education, to have some normality in their lives.
'There's a sense of hope for the future but, as our teams of social workers in the camps see every day, children have been through a great deal and it will take time to recover from the emotional and psychological impacts of the violence they have witnessed. There's still a long road ahead.'
Among those driven from their homes are tens of thousands of Christians, many of them now living in cities across northern Iraq as displaced persons. Questions remain about how and whether they will be able to return because of community tensions and the cost of repairing the region's shattered infrastructure.
One Catholic priest in Baghdad, Fr Albert, told International Christian Concern: 'ISIS's capture of Mosul and the Nineveh Plains was more than just an occupation for Christians. It's related to trust. ISIS broke the community and Christians will not be able to mix within the general community any more. This means many will seek immigration in the long term.'
He said: 'Half of the civilians in Mosul joined ISIS. Christians saw many movies on social media of how civilians welcomed ISIS in June 2014. How can they trust those people any more?'
ICC regional manager William Stark said: 'Although the liberation of Mosul is something to be celebrated, it doesn't change the fact that there is still a long road and difficult road ahead for Iraq's Christians.'
During the occupation, he said, 'ISIS not only destroyed much of what these Christians considered the symbols of their community, such as churches and schools, but also the homes these Christians were forced to leave in 2014.
There is much healing and rebuilding needed if Christians are to return to their communities in northern Iraq.'
He warned: 'If bold action is not taken, one of ISIS's legacies in Iraq could still be driving Christianity out of one of its ancient homelands.'