ONE evening in August Bakht Jan, a 15-year-old girl, attempted to elope with her boyfriend. Before she could meet him, relatives found her and brought her home. Although both families agreed on a swift marriage for their children, a jirga, or tribal council, demanded blood. Obeying its edict, Ms Bakht’s father drugged and then electrocuted her. Her boyfriend was murdered by his own father in the same way the next day, restoring “honour” in the eyes of the jirga.

Such barbarism has become synonymous with jirgas, a traditional form of justice that blends tribal and Islamic customs with the whims of participants. Despite a law passed in 2011 that allows police to arrest members of jirgas suspected of “anti-women” practices, grotesque abuses continue unabated, activists say. Mukhtar Mai, who was gang-raped on the orders of a jirga in 2002 as recompense for a sexual assault supposedly committed by a male relative, recently lamented that her subsequent campaign to curb the use of jirgas had not succeeded. Just three months ago a girl, aged 16, suffered a horrifically similar “revenge rape” in the same province.

Instead of trying to stamp out jirgas, however, the government has decided to integrate them into the formal justice system. Earlier this year it won parliamentary approval for a law that gives their rulings force, subject to certain reforms. The government will appoint “neutral arbitrators” to each jirga, who must approve their verdicts—a measure it hopes will eliminate misogynist horrors.

MPs seem untroubled by the plan. Just 23 of the 342 members of the lower house bothered to vote on it. The debate centred on whether to use the term jirga, given its diabolical reputation, rather than on whether the reform itself was a good idea.

Support for jirgas stems as much from the disrepair of the formal courts as from respect for tradition. The judiciary is smothered by a backlog of 2m cases. Lawsuits take almost a decade to resolve, on average. Lawyers often charge exorbitant fees, in advance. All this puts the formal justice system out of reach for many Pakistanis. This is not just a gross injustice in itself; it is also bad for security, says Syed Ali Akhtar Shah, a former chief of police of the state of Khyber Pakhtunkhwa. Such was the frustration with the courts in the northern district of Swat that the Taliban won local support by promising “speedy justice” when they took control of the area in 2009.

From his seat in a circle of plastic lawn chairs, Mahfooz Waheed, a former bureaucrat who runs a popular jirga in the city of Rawalpindi, close to Islamabad, argues that informal justice does not deserve its grim reputation. Only a sliver of the caseload concerns sexual or marital disputes, he argues, and only jirgas in illiterate backwaters produce the sort of decisions that end up making shocking headlines. Jirgas offer more than speed and economy, he notes: whereas judges in murder cases can only punish, he can offer compensation. Through his mediation, a widow whose husband and son were killed in a land dispute was paid $60,000—something of far more practical benefit to her than a conviction. Even the well-to-do seek his help. When a group of businessmen embroiled in a commercial dispute start to shout at one another, he snaps: “This is not a mall, or a court, or a police station, it is a jirga—so behave yourselves.”

Support is growing in unlikely corners. In 2016 a report commissioned by Britain’s Department for International Development (DFID) advocated studying the “merits” of jirgas, given the power they wield. Accordingly, DFID has recently funded gender-sensitivity training for tribal elders in Peshawar, a conservative northern city.

But activists for women’s rights tend to snort at such moves. British colonialists, points out Nazish Brohi, a researcher, also tried to preserve jirgas while eliminating their most abhorrent practices. But threats to banish those guilty of “honour killings” merely led to a spike in the number of violent deaths labelled suicides.

Lawyers, too, snarl at the idea of “mainstreaming” jirgas. Whoever drafted the new law “should be shot”, says one, since it grants licence to a system totally at odds with Pakistan’s constitution at a stroke. Rather than indulging mobs of senescent villagers, another suggests, the government should give the authority to resolve petty disputes to nazims, the lowliest of elected officials. Another option is to produce a proper land register. Given that, by some estimates, 90% of civil cases involve disputes about land, that would drastically reduce the burden on the formal courts. Instead, Pakistan is on the verge of cementing into law a tribal code that considers the term “property” to include women.