BAGHDAD -- For the millions forced to endure the brutal rule of "Islamic State of Iraq and Syria" (ISIS), life in its so-called "caliphate" was a living hell where girls were enslaved, music was banned and homosexuality was punishable by death.
ISIS applied an ultra-extremist interpretation of Islamic law across the swathes of Syria and Iraq that they captured in 2014, torturing or executing anyone who disobeyed.
The fall of the last sliver of ISIS's territory in eastern Syria marks the end of its proto-state, once the size of the United Kingdom and home to more than seven million people.
The fate of prisoners used by ISIS fighters as human shields remains unknown, but more than 3,000 Yazidis are still missing.
ISIS singled out the minority, followers of an ancient religion, for particularly harsh treatment that the United Nations has said may amount to genocide.
They slaughtered thousands of Yazidi men and boys, abducting women and girls and then selling them at slave markets.
Many suffered years of sexual abuse.
"We did everything they demanded," said Bessa Hamad, an Iraqi Yazidi sold six times by fighters before escaping their last redoubt in Syria.
"We couldn't say no."
Yazidi boys who survived were forced to fight and indoctrinated to hate their community, leaving families struggling to reconnect with the rescued ones.
Children who went to ISIS-run schools learnt to count with math books featuring guns and grenades, but ISIS banned pictures of people in the books.
As well as frontline fighters, ISIS ran its own police force, whose officers could impose fines or lashes on men whose breath smelt of cigarettes or alcohol.
ISIS burned books and banned dancing and music.
Instead, they broadcast propaganda via their own radio station.
ISIS members used sledgehammers to destroy priceless ancient artefacts they deemed idolatrous.
A strict dress code forced even young girls to wear a full black Islamic veil.
Beards and traditional robes were compulsory for men.
Thrown from rooftops
The extremists ran their own courts, imposing death sentences by beheading and hanging.
They stoned to death men and women accused of adultery. They shot men or threw them from rooftops for the "crime" of being gay.
They even introduced their own currency, minting coins that veterans of the battle against ISIS now keep as trophies.
The extremists imposed jail terms on those unable to pay ISIS taxes.
Mosul, Iraq, and al-Raqa, Syria, were transformed into the twin de facto capitals of the "caliphate".
Al-Raqa become a byword for atrocities carried out by the extremists, and it was from there that ISIS organised devastating overseas attacks.
Heads on spikes
To sow terror, ISIS displayed human heads on spikes in the city along with crucified bodies.
ISIS initially won support from some residents who felt abandoned and abused by corrupt state authorities.
But today, those who survived its rule accuse ISIS members themselves of graft -- as well as extreme acts of violence.
ISIS left more than 200 mass graves in Iraq, and thousands of bodies are expected to be uncovered in Syria.
Numerous women interviewed by AFP said they received ISIS-stamped death certificates for their executed husbands, but the extremists would not return their bodies.
It could take years to discover what happened to some of their victims.