DHULUIYAH, IRAQ (AFP) - The Islamic State in Iraq and Syria (ISIS) group once drew recruits from near and far with promises of paradise but now bodies of militants lie in mass graves or at the mercy of wild dogs as its "caliphate" collapses.
Flies buzz around human remains poking through the dusty earth in the Iraqi town of Dhuluiyah, 90km north of Baghdad, at a hastily-dug pit containing the bodies of dozens of ISIS fighters killed in 2015.
"They should have ended up in the stomachs of stray dogs," local police officer Mohammed al-Juburi told AFP.
"We buried them here not out of love but because we wanted to avoid diseases."
At one stage, ISIS ruthlessly wielded power over a vast swathe of territory straddling Iraq and Syria, but a military onslaught on multiple fronts has seen its fiefdom shrink to a last few pockets.
Since the launch in 2014 of air strikes in Iraq and Syria against the group, a US-led coalition says around 80,000 militants have been killed.
The overall number of dead is higher if you include those targeted by Russian and Syrian strikes.
Buried with bulldozers
In agricultural Dhuluiyah on the banks of the Tigris river, residents faced a common dilemma over what to do with the corpses of ISIS fighters after local Sunni militiamen beat back the militants in fierce clashes.
"We could have thrown them into the water, but we love the river too much to pollute it," said the local policeman, who lost his own brother in the violence.
"The people here as well as their animals drink from the Tigris."
Locals finally decided to dig a mass grave for the fighters - but they said they refused to honour them with Islamic rites.
"We buried them with bulldozers. Even in the ground they are still mired in their own filth," said farmer Shalan al-Juburi.
"They said that they would go to paradise to enjoy the gardens of delights, but this is how they ended up."
The desolate site is in stark contrast to a nearby graveyard surrounded by a red-brick wall a few hundred metres (yards) away.
There the "martyrs" who died helping to stop the militant advance lie in well-tended tombs adorned with their portraits and shaded by trees.
Elsewhere, in western Iraq's Anbar province, the luckiest among the ISIS dead appear to be those killed during its offensives against the army in 2015.
In the centre of Fallujah, the first major city captured by the group in 2014, hundreds of memorials in a makeshift cemetery bear the noms de guerre of foreign fighters buried by their comrades.
But as Iraqi forces in Anbar now look to oust the militants from their final footholds, operation commander Mahmoud al-Fellahi insisted any militants killed will end up in mass graves.
A similar fate befell ISIS members in the city of Mosul, the group's largest urban stronghold in Iraq that it lost in July.
There, a senior Iraqi commander told AFP, authorities used earthmoving equipment "to bury the militants after we collected information on their identities and nationalities".
'Desert dogs are waiting'
Across the border in Syria - where competing Russia and US-backed offensives are squeezing ISIS - the Britain-based Syrian Observatory for Human Rights estimates some 50,000 ISIS members have been killed.
As clashes rage with the militants, one Syrian commander said that what happens to dead fighters is not a priority.
"At the moment, we are more interested in what happens above the ground than under it," he told AFP.
Another military source said the identities of the fighters can provide useful intelligence.
"The terrorists try to collect their dead. If we find them, we try to identify the foreigners for a possible information swap with their home countries," the source said.
In the desert plains that the militants once dominated, the bodies of dead fighters are left abandoned, a pro-regime militia head told AFP.
"The desert dogs are waiting for them," he said. "When fighting ends, the dogs come out of their hiding places to collect the remains."
A spokesman for the US-backed force close to ousting ISIS from the city of Raqa said the bodies of the group's members were "generally buried" whenever possible.
"But sometimes due to snipers or because they are under rubble, some of the bodies end up rotting," said Syrian Defence Forces representative Mustefa Bali.
While the rank-and-file are often left forgotten, ISIS appears to have taken care to hide the final resting places of prominent Western militants.
"Figures who were well-known and wanted by the international community are buried at secret locations," said Syrian Observatory head Rami Abdel Rahman.
Those include notorious British executioner Mohamed Emwazi, known as "Jihadi John", propaganda chief Abu Muhammad al-Adnani and military leader Omar al-Shishani.
There has been no record of bodies of foreign militants being repatriated, said Abdel Rahman.