Forty years ago, the U.S. Supreme Court cemented the judiciary’s status as above the law. The issue at stake in Stump v. Sparkman was “absolute judicial immunity,” a legal doctrine that has its origins in common law dating back to the Middle Ages. The idea here is to protect judges from having to worry about potential litigation arising from their decisions, a possibility that might lead them to approach their jobs too cautiously. If we want a judiciary that issues rulings without fear of punishment, the argument goes, absolute immunity is a necessary trade-off.

The obvious problem with this doctrine is that the judges who stand to benefit from a system that ensures their legal lack of accountability are the ones who decide whether they themselves should get immunity. The case of Stump v. Sparkman offers a glaring example of how this framework can subvert the very idea of justice. In 1971, a judge from Indiana’s Dekalb County Circuit Court, Harold D. Stump, ordered 15-year-old Linda Sparkman to be surgically sterilized.* Sparkman’s mother had been worried that her daughter was hanging around with older boys. And so, in what I can only assume was an effort to prevent her daughter from getting pregnant, she went to the court and asked Judge Stump to order the operation.

Stump said yes. Really, that’s all he did. He didn’t file any paperwork with the court’s clerk or open a case file. There were no hearings, no presented evidence. He didn’t even tell the 15-year-old Sparkman the truth about her operation—she was told she was going in for an appendectomy. It was only four years later, two years after she’d been married and was trying to have kids, that she discovered what had really been done to her.

Sparkman and her husband sued Judge Stump (as well as her mother, the doctor who performed the surgery, and the hospital where the surgery took place) for damages under Section 1983 of the Civil Rights Act of 1871, which states (the bold is mine):

Every person who, under color of any statute, ordinance, regulation, custom, or usage, of any State or Territory or the District of Columbia, subjects, or causes to be subjected, any citizen of the United States or other person within the jurisdiction thereof to the deprivation of any rights, privileges, or immunities secured by the Constitution and laws, shall be liable to the party injured in an action at law, suit in equity, or other proper proceeding for redress, except that in any action brought against a judicial officer for an act or omission taken in such officer’s judicial capacity.

Sparkman argued that when Judge Stump ordered that she be permanently sterilized without going through any of the proper judicial channels his actions didn’t fall within his judicial capacity. He was using his judicial authority, maybe, but his actions were more administrative that judicial.

It was that argument the 7th U.S. Circuit Court of Appeals cited in siding with Sparkman and unanimously reversing a lower court’s decision. This couldn’t have been a judicial act, the appeals court reasoned, because there were no statutes on the books that could have justified sterilization.

But when the case made its way to the Supreme Court, the 5–3 majority ruled Sparkman’s judicial immunity was absolute. And they did so in a way that redefined, in a broad way, the definition of a “judicial act.” Writing for the majority, Justice Byron White ruled that a judicial act must be one undertaken by a judge in his official capacity and must be one a judge normally performs (in this case, not the specific act of issuing a sterilization order but the act of issuing orders more generally). The court ruled that Stump’s behavior passed that test, and so, despite the appeals court’s ruling that he’d violated Sparkman’s due process rights, the judge was off the hook.

This case is chilling not just because of what was done to Linda Sparkman. It’s also an example of the high court exercising its judicial authority to immunize itself from repercussions for violations of law.

The Stump v. Sparkman ruling had an immediate effect on how judges approached the concept of judicial immunity. Consider the many instances, among them Blackwell v. Cook in 1983 and Forrester v. White in 1988, in which circuit courts used White’s litmus test to rule that judges who hired, fired, or discriminated against court employees were immune from litigation, as these administrative moves had been “judicial acts.”

The courts have basically determined that, when dealing with police violence, everything is a gray area.

Sadly, the abuse of the concept of immunity hasn’t been quarantined to the courts. Remember Section 1983 of the 1871 Civil Rights Act? That was an example of Congress passing legislation that held government officials accountable to the people they serve. You might think Section 1983 would allow citizens to sue police officers who violate the law. For a while, that’s how it worked. In 1961, the Supreme Court ruled in Monroe v. Pape that 13 Chicago police officers could be sued for breaking into a house without a warrant. But in 1982’s Harlow v. Fitzgerald, the court used Section 1983 to extend what they called “qualified immunity” to the same government officials the 1871 Civil Rights Act meant to hold accountable. To its proponents, qualified immunity is basically a narrower, more limited version of the type of immunity judges enjoy. In instances of clear right and wrong, with firmly established law, officials won’t be protected. But in any sort of legal gray area, qualified immunity is supposed to kick in.

The Supreme Court took on a series of cases in the 1980s that specifically addressed the issue of police violence and immunity. Malley v. Briggs in 1986 and Anderson v. Creighton in 1987 both chipped away at an officer’s ability to be sued after performing a search without a proper warrant. Time and again, the court has sided with officers, offering them wide latitude to violate civil liberties without fear of being held liable. Just last week, the Supreme Court ruled 7–2 in Kisela v. Hughes that an Arizona police officer was protected by qualified immunity after he shot a woman standing on her own front lawn. Recall that qualified immunity was only supposed to apply in legal gray areas. The courts have basically determined that, when dealing with police violence, everything is a gray area, which means no officer will be held responsible for his actions.

Kisela v. Hughes is just the latest example of judges using the doctrine of immunity to shield themselves and other government officials. For Linda Sparkman, that meant no one would be liable for tricking her into getting sterilized. For the countless victims of police shootings, it means having fewer legal avenues to ensure offending officers answer for their actions in court.

In his dissenting opinion in Stump v. Sparkman, Justice Potter Stewart argued, “A judge is not free, like a loose cannon, to inflict indiscriminate damage whenever he announces that he is acting in his judicial capacity.” Just as judges shouldn’t be granted total immunity because they happen to be wearing robes, police officers must not be allowed to use their badges to shield themselves from justice. Congress passed legislation in 1871 that should give citizens a recourse when they’re wronged by government officials. Nearly 150 years later, the judiciary’s reliance on immunity has ensured that legislation is entirely toothless.

Correction, April 24, 2018: This piece originally misstated that Harold D. Stump was a judge in Illinois’ Dekalb County Circuit Court. He was a judge in Indiana’s Dekalb County Circuit Court.