Upon taking office in 2009, President Barack Obama pledged to close the prison at Guantánamo Bay within the year. We all know how that turned out.

Now, a decade into the sad experiment that is Guantánamo, we discover that the United States—supposedly a nation of laws—isn’t simply holding prisoners year after year without charge, but is rejecting their habeas corpus petitions almost out of hand.

A new study out of Seton Hall University School of Law finds that the federal district courts in Washington, D.C., granted 56 percent of the habeas petitions filed by detainees after the Supreme Court permitted the petitions in 2008. But since July 2010, the courts have rejected all but one. The turning point was a case called Al-Adahi v. Obama, decided by the D.C. Circuit Court of Appeals.

The study’s authors, two law professors, say this shows that the D.C. Circuit—generally considered the most powerful court in the country outside the Supreme Court—has made up its mind that henceforth nobody in Guantánamo Bay should be considered innocent. In Al-Adahi, the court essentially said that an error rate of 56 percent is intolerable, but rather than eliminating errors by actually eliminating them, it simply decided they didn’t exist.

“After Al-Adahi, the practice of careful judicial fact-finding was replaced by judicial deference to the government's allegations,” the authors write. “Now the government wins every petition.”

Let’s put this in context: Normally, when someone in America is charged with a crime, the first question the judicial system seeks to answer is not how to kill him. Rather, it is whether he has, in fact, committed the crime the government alleges. Back in 2003, Donald Rumsfeld purportedly said that the prisoners in Guantánamo Bay were all captured on the Afghanistan battlefield, and were the “worst of the worst” terrorists in the world. In a totalitarian dictatorship, we might accept this as true without question; in the United States, we generally require evidence.

Over the months and years, that evidence began to seep out, calling Mr. Rumsfeld’s assertions into question. First, his good friend, the Pakistan dictator General Pervez Musharraf, penned an autobiography, In the Line of Fire, bragging that fully half of the Guantánamo prisoners had not been captured in Afghanistan, let alone on a battlefield. They were Arabs who had been seized in Pakistan and sold to the U.S. for a bounty. Next, the U.S. military started making their own assessment. To date, they have released 610 of the 779 prisoners from Guantánamo—in other words, almost four out of five (78%) were no threat to the United States.

Thus did the military cull Rumsfeld’s “terrorists,” presumably into a rump who he would label the “worst of the worst of the worst.” Only a very small number of the Gitmo prisoners have ever resorted to the courts for a writ of habeas corpus, a legal remedy that tests the legality of someone’s detention. In the first 34 cases, a District Court judge ruled for the prisoner 56 percent of the time. In effect, the judges were saying that, even after several years spent trying to sort the terrorist wheat from the bystander chaff, and after winnowing out hundreds of the more obviously innocent, the probability that military intelligence had identified an enemy correctly was still less than a coin-toss.

So in Al-Adahi, the court set an impossible standard. Now, the district courts routinely deny habeas petitions, and when they do grant them, the circuit reverses them.

The professors’ theory is that this ruling was intended to intimidate the lower court judges into curtailing their liberal nonsense. That is, the Guantánamo prisoners were getting too much justice. Unfortunately, I can attest to the correctness of the professors’ theory, as I was in court when a federal judge recently observed that he had been sent a message by his appellate brethren.

It is important to understand that the habeas hearings are not deciding anything so mundane as whether the men in Guantánamo actually committed a crime. Indeed, only five people out of the 779 Guantánamo detainees have been convicted of a criminal offense; more than 99% have not. Rather, the question in a habeas proceeding is whether a prisoner has done anything that might—under a minimal burden of proof, with what is essentially a presumption of guilt supported by secret evidence—indicate an association with those who the government tars as terrorists.

Of course, I myself could be indefinitely detained under this standard, as could every other lawyer involved in the defense of Guantánamo prisoners. In this light it is astounding that federal district court judges find anyone wholly innocent, as has happened so often.

I visited some of the prisoners in Guantánamo two weeks ago. It is a place of deathly depression, which is hardly surprising. The same government that fights to prevent judges from embarrassing the military in court has, in a separate administrative proceeding in Guantánamo, “cleared” 87 of 169 prisoners who remain for release. In other words, the military has itself decided that slightly more than half (51%) of the remaining prisoners are no threat to the United States. Some were cleared seven years ago, yet they remain incarcerated in a maximum-security prison, essentially unreachable by American courts.

I am no expert on Soviet-era gulags, but I can’t think of another prison—certainly not in the modern, developed world—where most of the prisoners remained in indefinite detention after being affirmatively cleared for release. If the courts refuse to do their job, and if President Obama reneges on his 2009 promise, what hope does an innocent detainee have?