In terms of its structure, there is little remarkable about the Taliban's court system. Most districts in Afghanistan have a primary court in an easily accessible location, convening on a predictable schedule. Provincial courts hear trickier cases and appeals, and final cases go to a Supreme Court.
It has been that way for most of the past decade; details of the Taliban's three-tiered courts were first published by the militant group in 2010, and they grew more sophisticated over time. Until the Taliban completed its takeover of Afghanistan last month, however, its justice system was in the shadows, operating only unofficially and only in the parts of the country where it exerted enough influence. Even its Supreme Court was based in Pakistan.
But by the start of this year, Taliban-held parts of the country included tens of millions of Afghans, and Taliban justice became more familiar to them, and more trusted, than what the state offered.
Ashley Jackson and Florian Weigand of the Overseas Development Institute interviewed hundreds of men and women who used Taliban courts. Most of their interviewees perceived the Taliban's courts to be more efficient, effective and impartial than the justice system set out by the constitution of the country's now-fallen republic. Verdicts were easy to understand and supposedly rooted in Islamic principles. Most importantly, the Taliban had the influence and determination to actually enforce judgements – attributes many Afghan police seemed to lack.
Taliban justice was arguably one of the most effective tools the militant group had in winning some public trust. That was easy when it was, as Ms Jackson and Mr Weigand call it, "rebel rule of law". When the state's institutions are bloated, ineffective and corrupt – as many of them were under the Afghan republic – a more streamlined alternative, however unsophisticated its approach, seems desirable. If anything, for ordinary citizens jaded by bureaucratic elites, the lack of sophistication is especially attractive.
But the Taliban is now in charge, and the moral responsibility it bears is much heavier. There is no other game in town, so Taliban justice will be judged on its own merits – not against another start-up model.
While the Taliban's so-called "caretaker government" is not yet up and running, and it is unclear whether its existing court system is now a permanent institution, the presence of Taliban rule in major cities – where most of the world's attention is focused – has cast a harsh spotlight on what the merits of Taliban justice might be.
Several punishments have been carried out in large cities for those accused of theft. It is unclear from video footage whether the accused were tried and convicted with any due process. But the deliverance of justice has in all cases relied on two retributive tools: corporal punishment and public humiliation. In one instance in Herat, the accused's face was painted black and a noose was tied around his neck before he was paraded through the street to be mocked by crowds. In another, earlier this week in Kabul, the accused was tied to the pole of a street sign and flogged, kicked and mocked by the Taliban and the public.
During the previous administration under Ashraf Ghani and his predecessor, petty and violent crime were endemic in Afghanistan's cities. While much of the world's attention was devoted to political and militant violence in Afghanistan, on a day-to-day basis most Afghans in urban areas feared armed robbery or kidnapping far more than they did the Taliban or ISIS. So it is not difficult to find Afghans, even in comparatively educated and cosmopolitan Kabul, who are thrilled by Taliban justice. Several Kabul residents have told me they now feel safer, in this narrow respect. Public floggings and humiliation, some argue, are good deterrents against future crime.
It is unclear how effective corporal punishment is as a criminal deterrent. There are studies that support both sides of the argument and others that are inconclusive. When the British government examined the question in the 1930s, it found that in the preceding 40 years violent robbery was more frequent in England, where flogging was used as a punishment, than in Scotland, where it was not. Other studies carried out in New Zealand and Canada found that corporal punishment was no better a deterrent for crime than prison sentences. But Afghanistan is not the West, you might say.
Ten years ago, Peter Moskos, a former Baltimore police officer turned law professor, published a book called In Defence of Flogging, in which he argues that, when presented with a simple choice between years of prison or a quick, but painful session under the whip, a convict may choose the latter, and so presenting that choice is ethical. It is also a win for society, he suggests, because of the almost-innumerable negative externalities of the modern prison system – the expense, the long-term trauma, the high rates of recidivism and the damage done to families, to name a few.
Several Afghans who have defended flogging to me this week made the exact same arguments – the expense and injustice of America's prison system are known even in Kabul. Perhaps Afghanistan and the West have much in common on these points after all.
But even Prof Moskos doesn't take his own argument too seriously. He frames his book as a mere thought experiment, meant more to highlight the problem with prisons than the virtues of whipping. He has even admitted in interviews that he would not like to see flogging go back into law.
Why not? Maybe because it is, for all of us, deep down, just too viscerally brutal. It is a form of justice that many might be persuaded is logical, but that few could stomach carrying out with their own hands. Being flogged is traumatic. But flogging someone is also traumatic.
The most dangerous element of Taliban justice is the failure to recognise the implications of the latter trauma. In Kabul, floggings are not being carried out by designated officers in the solemn presence of a judge. They are being carried out in a way that encourages the active participation of the public, almost mob-like and for entertainment value, in a country where huge numbers of the public are already traumatised. Whoever is not traumatised further will become desensitised.
The common argument for punishing in this way is that the public square ensures accountability. But public participation can actually do the opposite. Incorporating ordinary citizens into the use of the harshest and most blunt instruments of justice only makes them complicit, and closes the distance between them and those they might hold accountable for potential abuses.
When that happens, even if public safety is temporarily assured, greater public harm in the long term is virtually guaranteed.