Throughout 2013, Mosul residents demonstrated against Nouri al-Maliki’s government , which lost the city long before the IS occupation. The people there were angry at the practices of the government and the military, complaining of random arrests without warrants. But these demonstrators were hit by a harsher reality.

The circular mainly focused on preventing the arrest of any citizen in Mosul in the absence of a warrant signed by the Sharia judge. It read that sanctions would be imposed in the event of any violation fo this dictate.

At the beginning of November, the Mosul wali (leader), IS' Dar al-Ifta official Quasi Abdul Mohsen, issued a circular that caught the attention of IS-affiliated media outlets. The document was initially published via “media points” — basically booths placed across the city's neighborhoods in which TVs broadcast IS-related videos — and subsequently shared on news and social media pages with ties to IS.

But IS is losing Mosul before officially leaving it. The residents of Mosul are starting to reject IS and its activities , after first turning to the group to free them of the Iraqi army and the central government’s practices.

The most credible story available today about the Islamic State (IS) occupation of Mosul on June 9 reads that IS occupied Mosul several years before that date and has long ruled it as a state within the state. Al-Qaeda and IS have been present in Mosul since 2006, when they took control of it by force, according to reports published by Western and Arab news outlets.

The IS strategy to occupy cities originally relied on taking advantage of Sunni complaints about the security authorities in Baghdad. The group timed its occupation of vast areas of Iraq for the moment when Sunni anger against the government reached its peak.

Displaced residents of Mosul in Erbil, Najaf and Sulaimaniyah testified to Al-Monitor that IS arrested 20,000-25,000 people in Mosul between June 30 and Oct. 30, 2014. These arrests included:

officers and members of the army, police, border guards and other security services

members and leaders in the local government and members of political parties, especially those participating in the recent elections

former Iraqi army officers and former Baathists

tribal and religious elders and leaders

women who worked in the judiciary or the government in Mosul, businesswomen and women who inadequately complied with IS dress codes

men who criticized IS and others who drank alcohol, smoked cigarettes or violated the tax code

Christians, Yazidis, Shabak, Turkmen and Kurds who were unable to escape

Most of the cases for these arrests were made with information provided by secret informants. The arrestees who made it out of the IS prisons have reported that the IS informant network is widely deployed in neighborhoods and that they are at once earning IS’ recognition and confidence and indulging personal reprisals or financial interests.

Mahmoud al-Musli, a young man who was reported by such an informant, told Al-Monitor after his release through the mediation of one of his relatives, “Most of those who were detained with me were taken away based on information that IS got from secret informants, and IS is getting more and more dependent on these informants.”

This list of detainees in Mosul is much more extensive than the list of those who suffered at the hands of the Iraqi security forces. Moreover, in light of the absence of laws, there are no longer courtroom trails and defense lawyers. A cleric called the “Sharia judge,” often a foreigner and one of the most radical elements of the organization, now decides on the proper punishments.

The increasing arrests have raised the density in prisons to unprecedented levels and placed pressure on the economy of the organization, which is required to pay for guards in detention centers, the investigators and food for the prisoners, prompting IS to execute many prisoners. There are cases of people being detained for smoking and being executed.

According to witnesses who spoke to Al-Monitor from Mosul, most of the executions are carried out en masse and in secret. To increase their impact, some of these executions are performed in public squares, filling the Mosul morgue with corpses. Families of detainees end up waiting for their children in front of the morgue instead of at the courts.

One man who wished that his name be withheld spoke to Al-Monitor over the phone about the changing mood of the city. “We have to admit that IS used to have a broad favorable environment within the city, and it has often imposed itself as a protector or avenger of any attack against the population. It was even taking care of hundreds of families of the detainees or the dead regardless of their affiliation to the organization,” he said.

“IS,” he continued, “which presented itself as a defender of the Sunnis, attracted sympathy and was welcomed by the people in the first days of the occupation of Mosul, especially as it was carried out under the cover of former Baathists and army officers, before people also turned against them.” He said the wide Sunni sympathy for IS cracked less than two months into the occupation of the city.

Another said, “In just a few weeks, IS lost its base in Mosul, which justified its aggressive behavior against the people and the increasing number of its detainees and executed people.”

He added, “The organization discovered that ruling is different from occupying a city whose population exceeds 2 million people. Add to this the crimes committed against Christians and Yazidis, the demolition of shrines, the displacement, the unemployment, the downfall of the city's economy, the doubling of the inflation rate and the bankruptcy of a large number of traders. These factors helped change the popular mood against IS.”

The behavior of Abu Bakr al-Baghdadi’s fighters, their violation of families' privacy and of tribal values, their dissemination of reactionary laws and their imposition of certain lifestyles and dress codes unfamiliar to the population, witnesses say, also changed their city.

According to a former lawyer in Mosul, IS “did not provide the people with any economic, security or social solutions to their crises. It rather deepened their crises while waging an international and regional venture, and the people are aware that they will end up paying for it before the members of the organization.”

He added, “IS wanted to put an end to any hopes of life in the event that the caliphate shattered, and it is playing for time to promote this feeling.”

While the people of Mosul agree that IS is not part of the city's future, the violence is increasing as fighters from elsewhere join the group, which is calling for ever more volunteers from other countries.