There have been no surprises in Mosul. The Islamic State of Iraq and the Levant (ISIL) was roundly defeated, and the combined forces of the Iraqi security services are victorious.

In eastern Mosul, which was liberated months before the rest of the city, Iraqis are seeking to return to normality as fast as possible, by reopening their businesses, resuming classes and exams, organising cultural activities, rebuilding libraries and engaging in reconciliation initiatives. In case there was still any doubt, Iraqi society is once again proving just how resilient it is.

Sadly, that is not where the story ends. As if reading from a script, a stream of soldiers, federal police officers and popular mobilisation fighters have engaged in mass arrests, torture, and summary executions of suspected ISIL fighters.

Increasingly, the perpetrators record every detail of their gruesome acts and post them on social media for all to see, including videos in which captives are thrown from the top of buildings and showered with bullets after they land on the riverbank. Just as seriously, individuals who are thought to be related to ISIL fighters, colloquially referred to as "ISIL families", are imprisoned in horrific conditions, many of them left without sustenance and medical care.

For the sake of clarity, the perpetrators include people of all faiths and races and are members of almost every security agency imaginable. In fact, just about the only security force that has not been accused of human rights abuses is the Counter Terrorism Service, which has been leading the fight against ISIL since 2014 (because the CTS is not politicised, it has not received anywhere near as much attention as other groups, such as the Popular Mobilisation Forces and the Peshmerga). Its commander, Lieutenant Abdel Ghani al-Saadi, is rumoured to have unsuccessfully challenged his counterparts from other agencies, as he learned of the abuse that was taking place, before storming out of the city.

Senior interior ministry officials have noted that torture and unlawful killings will be investigated and prosecuted in all cases, but it is common knowledge that prosecutors and judges are largely powerless to move against the security forces, despite a few token arrests. In fact, some of the worst perpetrators of abuse have argued that courts are so corrupt that any ISIL fighter who is arrested could bribe their way out of prison.

Also predictable is that commentators have reacted according to their political colouring. Sectarian Sunni politicians, who have barely raised a whimper to condemn the unrelenting wave of terrorist attacks that have targeted Baghdad since 2003, rediscovered their humanity when the images from Mosul were circulated online. Meanwhile, many pro-government Iraqis and foreigners have been busy trying to brush the abuse aside as an inevitable byproduct of the conflict and as altogether unimportant given the context. Commentators have also noted that Iraqis largely do not care about this type of abuse, and any attempt to disseminate information on what happened is motivated by an attempt to sow discord in Iraq.

There is little question that many Iraqis have suffered deep traumas that are often at the root of the abuse that was recorded and distributed over the past few weeks. Even so, the attempts to minimise what has taken place, the explanations that have been offered and the conclusions that have been reached are both misplaced and very dangerous.

Apart from the fact that many of the victims are probably innocent of any criminal behaviour, and apart from the obvious inhumanity of the way that they were treated, the fact is that torture and summary executions are totally prohibited under international and Iraqi law.

In that context, the failure to prosecute the perpetrators does not just mean that criminal elements are allowed to proceed with their lives unpunished. It also sends a very clear message to all security services that they can act with impunity in a city where they already have an inflated sense of their own power. It is precisely that sense of lawlessness that was so damaging before 2014 and which will create fear among ordinary people.

The tragedy is that news of the abuse has already travelled far and wide, which has lessened the service of those soldiers, police officers and others who served with distinction and professionalism. More importantly, it betrays the sacrifice of the very many martyrs who gave their lives in liberating Mosul, Tikrit and other parts of Iraq from ISIL occupation.

And as acts of brutality and random arrests continue to go unpunished, broad segments of the population will be unable to distinguish between rogue elements within the security services and those that are worthy of trust. They will learn to fear the same security force which liberated them, which is precisely the type of relationship that ISIL and other terrorist groups seek to exploit.

Many of us have been warning that the Iraqi state will need to engage in deep reform to prevent the re-emergence of Al-Qaeda in Iraq. Some of these reforms are obvious and not hard to achieve, including improving the implementation of laws that are already on the books and designed to prevent abuse by criminal elements within the security services.

It seems that that advice is going unheeded and that the Iraqi state is once again contributing to what will likely be more instability and suffering. If that does transpire, then it should also not come as a surprise.

Zaid al-Ali is an Iraqi lawyer. He has law degrees from Harvard Law School, the Université de Paris I (Sorbonne), and King’s College London. From 2005 to 2010, he was a legal adviser to the United Nations, focusing on constitutional, parliamentary and judicial reform in Iraq. Since the beginning of 2011, he has been working on constitutional reform throughout the Arab region, in particular in Tunisia, Libya, and Egypt. He has published widely on Iraq and on constitutional law.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.