Islamic State of Iraq and the Levant has crushed a rebellion plot in Mosul led by one of its commanders who aimed to switch sides and help deliver the city to Iraqi forces, Reuters news agency reports.
ISIL executed 58 people suspected of taking part in the plot after it was uncovered last week. Residents, who spoke to Reuters from some of the few locations in Mosul that have phone services, said the plotters were killed by drowning and their bodies were buried in a mass grave in a wasteland on the outskirts of the city.
Among them was a local aide of ISIL leader Abu Bakr al-Baghdadi, who led the plotters, according to matching accounts given by five residents, by Hisham al-Hashimi, an expert on ISIL affairs who advises the government in Baghdad, and by Colonel Ahmed al-Taie, a military intelligence officer.
Reuters did not name the plot leader to protect his family, nor did it publish the identities of those inside the city who spoke about the plot for their safety.
The aim of the plotters was to undermine ISIL's defence of Mosul in the upcoming fight, expected to be the biggest battle in Iraq since the 2003 US-led invasion.
Iraqi officials say a massive ground assault could begin this month, backed by US air power, Kurdish security forces and Shia and Sunni irregular units.
The United Nations says the operation could create the biggest humanitarian crisis in the world, in a worst case scenario uprooting up to one million people.
According to Hashimi, the plotters were arrested after one of them was caught with a message on his phone mentioning a transfer of weapons. He confessed during interrogation that weapons were being hidden in three locations, to be used in a rebellion to support the Iraqi army when it closes in on Mosul.
ISIL raided the three houses used to hide the weapons on October 4, Hashimi said.
"Those were Daesh members who turned against the group in Mosul," said Iraqi counterterrorism service spokesman Sabah al-Numani in Baghdad, using an Arabic acronym for ISIL. "This is a clear sign that the terrorist organisation has started to lose support, not only from the population but even from its own members."
A spokesman for the US-led military coalition, which conducts air strikes on ISIL targets in Syria and Iraq, was unable to confirm or deny the accounts of the alleged thwarted plot.
Deserters describe life under ISIL rule
A list with the names of the 58 executed plotters was given to a hospital to inform their families, but their bodies were not returned, residents said.
"Some of the relatives of the executed sent old women to ask about the bodies. Daesh rebuked them and told them no bodies, no graves. Those traitors are apostates and it is forbidden to bury them in Muslim cemeteries," said one resident whose relative was among those executed.
"After the failed coup, Daesh withdrew the special identity cards issued to its local commanders to prevent them from fleeing Mosul with their families," Colonel al-Taie said.
A Mosul resident said that ISIL had appointed a new official, Muhsin Abdul Kareem Oghlu, a leader of a sniper unit with a reputation as a diehard, to assist its governor of Mosul, Ahmed Khalaf Agab al-Jabouri, in keeping control.
ISIL has placed booby traps across Mosul, dug tunnels and recruited children as spies in anticipation of the offensive.