How powerful is the law? The laws of armed conflict—grandly and euphemistically called “international humanitarian law”—have never been better cultivated by so many jurists, yet somehow hundreds of thousands of Iraqis managed to die after our 2003 invasion, with a perhaps greater number perishing due to the economic sanctions between our Gulf Wars. The era since World War II has also seen an expansion of defendants’ rights in criminal procedure, yet in the past 30 years the arc of our history has bent toward mass incarceration on a scale surpassed only by the Gulag.

None of this is lost on Anthony Gregory, a researcher at the libertarian Independent Institute whose recent book, The Power of Habeas Corpus in America, is a sophisticated biography of that most essential legal right, the “negative liberty” not to be arbitrarily imprisoned by the state. As Rubin “Hurricane” Carter, a boxer framed for murder and then freed on a habeas motion, said, “The Writ of Habeas Corpus is not just a piece of paper, not just a quaint Latin phrase. It was the key to my freedom.”

But despite the central importance of habeas in Anglo-American law and legal folklore, Gregory’s study is anything but a soaring law-school graduation speech about the majestic triumph of legal principle. Instead, Gregory’s account of the “Great Writ” reveals its history is “characterized by politicization, unfulfilled promises, legal technicalities, power struggles and hypocrisy, as much as a story of liberation and justice.” In fact, our hero H.C. frequently seems like a minor character in its own wide-angle biography, knocked around by war, social upheaval, and the immense centripetal force of state centralization.

Gregory begins his account in British Isles, where habeas was not bequeathed to free-born Englishmen by a legal Lady of the Lake but rather sprouted almost accidentally in the space between feuding court systems—the Norman crown in London versus the older common law system at work in the provinces. “The writ’s core purpose was jurisdictional muscle-flexing,” says Gregory of habeas’ unglamorous early years. But the procedure, by which a prisoner could demand a review of his or her detention by a higher court, became a bulwark against oppressive state power.

Puritans and parliamentarians later demanded the codification of habeas to protect against arbitrary detention—yet then, as soon as these groups acquired executive power, they ruthlessly pruned back the writ’s scope, a two-step they would not be the last to perform. In early modern British history, enemies of the state were rounded up on vague charges and stashed away in the Channel Islands or elsewhere on the British Empire’s periphery, places where jurisdiction was contestable and lawyerly interference difficult. Sound familiar?

In colonial North America, the common law right of habeas corpus took deep root and was even enshrined in the U.S. Constitution. But though statutory codifications of rights are typically advertised as a triumphs for freedom, such legislative acts are almost always a curtailment of the right’s scope, a scaling back of some of the unwritten powers the right formerly held. And the Constitution, for Gregory, entailed a lamentable reduction of habeas corpus as it furnished the central government with an “off switch” in the form of Article I, Section 9, which allows the writ to be suspended in time of national emergency.

Gregory therefore does not try overly hard to argue that Lincoln’s suspension of habeas corpus—an action repeated by Jefferson Davis in the Confederacy—was in any real sense illegal, as many libertarian jurists have contended in the past. Perhaps because Gregory is a non-lawyer, he is refreshingly able to see laws as the prosaic, secular creation that they are: he refreshingly does not see the U.S. Constitution as a semi-divine expression of unerring wisdom.

Gregory’s story, like almost any other legal history of the United States, features the ongoing struggle between states’ rights and the authority of central government as a major theme. Yet although states’ rights have often been a legalistic fig leaf for Jim Crow, Gregory shows that local legal autonomy has at times stood against white supremacy. State governments, for instance, issued habeas challenges on behalf of individuals jailed for violating the federal Fugitive Slave Act. It was Supreme Court Justice Taney’s decision in Ableman v. Booth that put an end to state habeas challenges to federal laws.

Still, Gregory’s insistence that centralized authority is by definition more tyrannical than local authority does not always convince. He concedes that Reconstruction’s “importance in the history of American freedom can never be overstated,” yet he still welcomes its demise in 1877, a rollback blasted by many Republicans at the time as a “corrupt bargain” stemming from Rutherford Hayes’s electoral putsch and rightly lamented by many outside the white South as setting back racial equality by generations. It is also difficult to see President Grant’s suspension of habeas in nine South Carolina counties in order to fight the Ku Klux Klan as a tragedy for American freedom.

That said, Reconstruction did clinch the federal government as supreme arbiter over the states in habeas matters—without any reciprocal power for the states to question federal detention—with Tarble’s Case. thisarticle

It will surprise no one that habeas did not flourish during the Great War or its sequel. In spite of Cicero’s maxim about the law going silent in time of war, it turns out that jurisprudence gets horribly loquacious during armed conflict, with all sorts of legal justifications for the suspension of habeas and other basic rights babbling forth. Gregory’s book is appended with incisively detailed legal-political analyses of landmark habeas cases, from Korematsu, which gave the all-clear to wartime internment of Japanese-Americans, to more recent cases in our Global War on Terror.

One of these—Boumediene v. Bush, decided six years ago—upheld the right of Guantanamo detainees (noncitizens all) to habeas review, a victory for civil liberties that was barely even pyrrhic. Congress swiftly responded by passing a bill that legalized everything that Bush had been doing without express legal authority. And when in mid-2009 Obama made a listless half-effort to transfer Guantanamo prisoners into the federal justice system, the Senate, including a majority of Democrats, voted to deny funding for any such action. Americans of all political stripes love to bemoan the unchecked executive branch, but when it comes to national security and foreign policy, increased Congressional supervision can just as easily lead to more whistleblower prosecutions, foreign wars, and curtailments of basic rights.

At least as troubling as the national-security cases is the peacetime deterioration of habeas and the rise of a penal state that often makes Guantanamo’s prison, awful as it is, look like a resort. True, the Warren Supreme Court did expand the possibilities for habeas review of state court convictions. But as the late criminologist William Stuntz argued, the postwar “Rights Revolution” had the perverse side effect of overwhelming criminal courts with cases hinging on procedural violations. The system responded by strong arming more and more defendants into plea deals, deals often shaped by increasingly draconian mandatory minimum sentences.

Gregory blisteringly notes that “the U.S. criminal justice has become a system of slavery, rape and torture,” and he urges the expansion of habeas review—which has been whittled away since the Rehnquist court to a vestigial nub—for federal prisoners. And he is not averse to retooling habeas for new purposes: “Conservatives who protest that habeas did not originally apply to probation and parole, the application to which has indeed caused unforeseen clumsiness in habeas litigations, should acknowledge that these institutions did not arrive until the twentieth century.”

Anthony Gregory has written a book that is both fiery and cool-headed, and he is an excellent guide to the circuitous and bumpy ride that is the history of the Great Writ.

Chase Madar is an attorney in New York and the author of The Passion of Bradley Manning: The Story Behind the Wikileaks Whistleblower.