For the millions forced to endure the Islamic State group's brutal rule, life in the "caliphate" was a living hell where girls were enslaved, music was banned and homosexuality was punishable by death.

The jihadists applied an ultra-conservative 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 IS territory in eastern Syria marks the end of their proto-state, once the size of the United Kingdom and home to more than seven million people.

The fate of prisoners used by the jihadists as human shields remains unknown, but more than 3,000 Yazidis are still missing.

The jihadists singled out the minority, followers of an ancient religion, for particularly harsh treatment which the UN has said may amount to genocide.

They slaughtered thousands of Yazidi men and boys, abducting women and girls 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 jihadists before escaping their last redoubt in Syria.

"We couldn't say no."

Yazidi boys who were not killed were forced to fight and indoctrinated to hate their community, leaving families struggling to reconnect with those who were rescued.

Children who went to IS-run schools learnt to count with maths books featuring guns and grenades, but pictures of people were banned.

As well as frontline fighters, IS ran its own police force, whose officers could impose fines or lashes on men whose breath smelt of cigarettes or alcohol.

Books were burned, while dancing and music were banned. Instead the jihadists broadcast propaganda via their own radio station.

The jihadists 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, sentencing people to death by beheading and hanging.

Men and women accused of adultery were stoned to death. Men were shot or thrown from rooftops for the "crime" of being gay.

The jihadists even introduced their own currency, minting coins that veterans of the battle against IS now keep as trophies.

Jail terms were imposed on those unable to pay IS taxes.

Iraq's major northern city of Mosul and Raqa in Syria were transformed into the twin de facto capitals of the "caliphate".

Raqa become a byword for atrocities carried out by the jihadists, and it was from there that IS organised devastating overseas attacks.

Human heads were displayed on spikes in the city along with crucified bodies, to sow terror.

The Kurdish-led Syrian Democratic Forces declared territorial victory over the Islamic State group on Saturday after years of fighting / © AFP

IS initially won support from some residents who felt abandoned and abused by corrupt state authorities.

But today, those who survived its rule accuse the jihadists themselves of graft -- as well as extreme acts of violence.

IS 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 IS-stamped death certificates for their executed husbands, but the jihadists would not return their bodies.

It could take years to discover what happened to some of their victims.

Some IS members leaving the group's last redoubt of Baghouz in eastern Syria have cricitised the group's leadership.

"God's law was applied," said Abdel Moneim Najia, a jihadist who stayed in what was left of the "caliphate" until its final days.

But he voiced the same grievances as Iraqis and Syrians expressed about their governments ahead of the IS takeover.

"There were injustices," he said. "Officials stole money and abandoned the people."