The killing of Bijan Ghaisar, the young accountant unjustifiably shot to death by U.S. Park Police near Washington in 2017, is now the subject of a slow-moving criminal case brought by Virginia prosecutors, as well as a lawsuit against the federal government by the Ghaisar family. However, the two hotheaded officers who killed Ghaisar face no lawsuits themselves. Federal agents around the country are beyond the reach of consequences, and accountability, in civil court.

If the litany of unjustified shootings and other unacceptable law enforcement conduct has shown anything, it is that prosecutors, who work with and rely on police, are highly reluctant to charge uniformed officers with criminal offenses. That often leaves victims and their families little recourse to enforce their rights beyond litigation based on the Constitution’s Fourth Amendment guarantee that people be “secure in their persons” and safe from arbitrary arrests.

State and local police officers are often subject to such lawsuits when their actions are beyond the pale. But it’s a very different picture for the nation’s more than 100,000 federal law enforcement officers, or even police detailed to federal task forces. Owing to an exceptionally narrow reading of Supreme Court precedent, some appellate courts have ruled that federal law enforcement badges confer all-but-complete immunity from lawsuits — no matter how egregious an agent’s conduct. In effect, they have made the Bill of Rights an empty promise and, as one federal judge noted, allowed federal officers to operate “in something resembling a Constitution-free zone.”

The extent to which that is true, and infuriating to ordinary Americans, is illustrated in a pair of recent federal appeals court rulings whose effect is to make federal agents untouchable in civil court.

In one, the U.S. Court of Appeals for the 5th Circuit shielded a Department of Homeland Security agent from litigation even though he was seen in video footage accosting Kevin Byrd, who had been raising questions about a drunken driving incident involving a friend of his and the agent’s son. Mr. Byrd had done nothing remotely illegal. Nonetheless, the agent, Ray Lamb, rushed him with gun drawn, threatened to “blow his head off” and pulled the trigger of his weapon, which jammed. Brandishing his badge when police arrived, the agent managed to have Mr. Byrd detained — until police saw the video evidence.

Yet when Mr. Byrd sought his day in court, the appellate court blocked him. “If you wear a federal badge, you can inflict excessive force on someone with little fear of liability,” one of the court’s judges wrote ruefully.

Another federal appeals court, the 8th Circuit, reached a similar conclusion in blocking a lawsuit against a St. Paul, Minn., police officer, Heather Weyker, whom courts found had lied to frame a young woman who also had committed no offense. Incredibly, the young woman, Hamdi Mohamud, was denied any hearing in civil court even though she spent more than a year in prison.

Neither Mr. Lamb, now retired, nor Officer Weyker, who remains on the St. Paul force, has been prosecuted. The rulings that provided them a cocoon of immunity are now being appealed to the Supreme Court by the Institute for Justice, a public interest group. By reestablishing an avenue of accountability where federal agents are concerned, the high court could restore a modicum of justice.