Consider the case of John Thompson, who spent 14 years on death row for a murder he didn’t commit because the New Orleans Parish district attorney’s office intentionally concealed forensic evidence establishing his innocence. After his exoneration, Mr. Thompson sued the office under Section 1983 of the Civil Rights Act of 1871, landmark legislation intended to provide a federal forum to those deprived of their civil rights by state officials.

Though Mr. Thompson won a $14 million jury award, the Supreme Court set aside the verdict on appeal. Notwithstanding the fact that the New Orleans prosecutors had similarly withheld evidence in at least four other cases, or the fact that several prosecutors suppressed the evidence in Mr. Thompson’s own case, the court said that Mr. Thompson had failed to demonstrate a pattern of wrongdoing by the district attorney’s office, which it held was required by Section 1983. The court’s decision illustrates just one of a host of protections it has given to prosecutors and judges to shield them from liability.

Civil cases like Mr. Thompson’s reveal a frightening reality. In privileging the discretion of prosecutors and judges to enforce the law, we have come perilously close to placing these officials above the law. We do not know the extent to which judges and prosecutors cross the line into criminality. After all, cellphones rarely capture the moment when a judge or prosecutor illegally locks someone away.

Nonetheless, advocates across the country continue to expose judges who unlawfully deprive defendants of lawyers or throw people in jail simply because they are too poor to pay small amounts of money. We are constantly confronted with wrongful convictions rooted in a prosecutor’s belief that winning a case is more important than seeking justice. These experiences compel us to recognize that sometimes the criminals our justice system most needs to confront are actually running it.

There is a solution: federal criminal prosecutions of state judges and prosecutors who flout the law. The nearly insurmountable barriers to justice in civil court don’t apply in criminal prosecutions. Indeed, the Supreme Court has invoked the availability of Section 242 prosecutions to justify its sealing of federal courthouse doors against people seeking to vindicate their civil rights.

Judges and prosecutors violate civil rights every day, in plain sight, and with seeming impunity. To make them answer for these crimes, the federal government must continue to extend its reach beyond the streets and into the courtroom.