IS media spin Mosul narrative
So-called Islamic State (IS) made a success story of its triumphant capture of Mosul in 2014, and it will seek to create one out of the loss of the city to Iraqi forces.
While promising a fierce fight to the end, IS prepared the way in its propaganda for its military defeat in the city.
The group began to shift its messaging in May 2016 amid losses in its Iraqi and Syrian heartland, saying that victory was not determined by territorial hold but persistence in faith.
It emphasised its enduring ideological reach, insisting that the group was invincible even if it faced what it portrayed as temporary setbacks on the ground.
IS cited a military official as saying the group had begun readying for its battle to defend Mosul from the first day it captured the city, suggesting the group knew its hold on the city could never last.
Following the launch by Iraqi forces of the operation to recapture Mosul in October 2016, IS has played up the strength of its affiliates in other countries.
It recently suggested that the capture of parts of the city of Marawi in the Philippines by pro-IS militants in May was reminiscent of its capture of Mosul, indicating that the symbolic centre of its so-called "caliphate" could be revised.
The group noted that a precursor had lost control of areas of Iraq in 2007 but resurfaced much stronger.
IS has demonstrated its ability to carry out attacks in various parts of Iraq outside Mosul, with a current offensive near Qayyara to the south of the city diverting attention from its crumbling "caliphate".
It has issued multiple calls for attacks worldwide, and in June claimed a third attack in the UK and its first attacks in Iran and Israel.
In the course of the battle for Mosul, IS has often said the city would prove to be a graveyard for its enemies.
But on 7 July it described Mosul's Old City as a graveyard for thousands of civilians, blaming their suffering on US-led coalition bombardment.
This served its narrative depicting an alleged global war against Sunni Islam.
IS used the destruction in Mosul - including the landmark Great Mosque al-Nuri and Hadba minaret, reportedly orchestrated by the group itself - to serve its own ends.
It boasted about the fierce resistance its members had put up in the city over almost nine months, against an array of powerful enemies.
It also gloated about the material and human cost visited upon its foes.
In a recent recognition of its demise in Mosul, the group said it planned to apply lessons derived from the protracted battle to future fronts in its unending war.
These are just some of the ways its media spins victory out of military defeats.