TO BE SURE, in affirming this authority, the judiciary placed procedural and evidentiary requirements on it, and in the process established what Judge Stephen Williams described as “an entirely new role [for the federal judiciary] in the nation’s military operations.” These new judicial requirements are certainly not trivial, and some are burdensome. And they have had an impact on the behavior of the government. Though courts approved most government detentions between 2009 and 2011, they did grant habeas relief to detainees in fourteen cases that the government did not subsequently challenge, a number that amounts to almost a quarter of the habeas cases then brought by GTMO detainees. The government also released others because it believed that in those cases they could not meet the detention standards announced by the courts.

The courts’ influence extends beyond GTMO to the battlefield. By ruling on who could and could not be detained, the courts have effectively defined the scope of the global conflict with Al Qaeda under the 2001 congressional authorization of force. When Obama administration lawyers determine how far they can go in targeting terrorist threats—especially threats outside the traditional battlefield in places like Yemen and Somalia—they are guided in part by the analysis and basic restrictions in these cases. They are also guided by these sources in their detention operations in Afghanistan.

In these and other ways, the judicial review established by Ratner and CCR have had a constraining impact on the President, his senior national security advisers, and soldiers in the field. So why are civil libertarians disappointed in these results? It’s not just because the courts’ decisions have been less than absolutist. It’s also because the constraints that the courts have imposed have actually served to empower the government. “Our opinion does not undermine the Executive’s powers as Commander in Chief,” asserted Justice Kennedy in his opinion for the Supreme Court in Boumediene. “On the contrary, the exercise of those powers is vindicated, not eroded, when confirmed by the Judicial Branch.”

The burdens imposed by the Boumediene decision and the other landmark Supreme Court decisions in the last decade have been accompanied by judicial and legislative approval for some extraordinary presidential powers in the long war against terrorists. It is a remarkable fact that in the eleventh year of the “war on terrorism,” the administration of Barack Obama is detaining 170 or so terrorists at Guantanamo Bay without charge or trial, is prosecuting some of these detainees in a military commission, and is detaining almost 2,000 more in Afghanistan.

These practices remain controversial in some quarters, and are not what the Obama administration set out to do. But there is no doubt that they are now lawful and legitimate practices within the American constitutional system. This is partly a result of the lawsuits. And it is partly because Congress often sided with the president (albeit with restrictions) when it was forced to exercise its national security responsibilities. The presidency was empowered to exercise its military prerogatives because the other branches of government considered the matter and, with caveats, told the President he could. Crucially, and in part as a result of deliberations in Congress and the courts, the executive branch’s prosecution of the war on terror today enjoys the widespread support of the American people.

THESE ARE PAINFUL FACTS for Ratner and his activist colleagues to acknowledge. Their lawsuits and campaigns achieved much in the decade after 9/11, much more than they expected. They built up a global social movement of activists, lawyers, foreign governments, and the media, to bring habeas corpus rights to GTMO and to pressure the government to release all but the most dangerous prisoners there. “Obviously, getting six or seven hundred people out of Guantanamo out of the nine hundred was a huge accomplishment,” notes Ratner. He and his colleagues, he says, “have also taken on what I consider the most egregious aspects of what I call the national security state since 9/11, and made them public debating issues.” By making the issues matters of public debate, they ensured that the courts and Congress and the American people had to engage in the issues, and to address them.

But the bitter reality for Ratner and his colleagues is that because the courts, Congress, and the American people do not share their outlook, the United States has arrived at a place in 2012 where the activists desperately did not want it to be. The GTMO Bar won landmark Supreme Court decisions on due process for detainees, on habeas corpus, and on the limits of presidential power over military commissions. And yet stepping back from these battles, Ratner believes that he and his colleagues lost the war. “We lost on the enemy combatant issue, and the definition. We lost on the preventive detention issue, more or less. We lost on the military commission issue, more or less.”

They lost on these issues because while the courts and Congress imposed constraints on these traditional practices by the Commander in Chief, they also affirmed the general legitimacy of the practices. The efforts of the other branches of the government placed these practices on a much firmer foundation than they were during the early unilateralist era of George W. Bush. The foundation became firmer yet because it was embraced, albeit grudgingly, by the administration of Barack Obama. “My problem is that when you have a Democrat doing it as well as a Republican … both the good and the bad becomes embedded in the rule of law,” says Ratner.

Ratner thinks that military detention, military commissions, and many other wartime prerogatives of the Commander in Chief are unnecessary, immoral, or illegal. But for those who disagree with Ratner on these points—for those who believe that the terrorist threat remains real and scary, and that the nation needs a Commander in Chief empowered to meet the threat in unusual ways—embedding these presidential prerogatives in the rule of law is an enormous blessing. It is a blessing, ironically, for which the nation has Michael Ratner and his colleagues to thank.

THE EXPERIENCE OF Michael Ratner and CCR is typical of the way that checks and balances have operated in the first decade of the indefinite war against Islamist terrorists. Many institutions have risen to check the power of the presidency. Some of these institutions—Congress, courts, and the press—are ones the framers expected to push back. Others—like globally networked human rights organizations and watchdogs inside the executive branch—the framers could not have imagined.

Nearly every national security institution, and every critic and watcher of these institutions, believes it is on the losing end of the stick in trying to influence U.S. counterterrorism policies and their associated accountability mechanisms. The Bush and Obama White Houses did not get the different things they wanted on GTMO and civilian trials, just as Michael Ratner and CCR did not get what they wanted on GTMO and civilian trials. Conservatives believe Ratner and the CCR achieved illegitimate victories in the Supreme Court that hamstrung the President. Ratner thinks he won some battles but lost the war. Congress pushed back on the presidency in novel ways, but it tried to go further, against both Bush and Obama, and failed. The press uncovered an astonishing array of classified national security secrets in the last decade, but it thinks the executive branch hoards too many secrets and unduly harasses journalists. The executive branch thinks leaks harm national security, and that it should crack down more on journalists and their sources. National security lawyers think they are besieged bastions of independence holding the executive branch in check; activist and media critics believe the lawyers are apologists for executive power. Lower court judges are unhappy that the Supreme Court dumped on them the duty to make terrorist detention policy from whole cloth in habeas corpus cases, and are frustrated that Congress has not stepped in more to fill the void. Some critics charge that these judges have released too many GTMO detainees; others charge that they have released too few. And so on, and so on.

This is how the country has moved, in fits and starts, toward a consensus legal infrastructure for national security policy. And in broad outline, and adjusting for modern circumstances, the process is one that James Madison would recognize. Madison believed that a properly designed government “would check interest with interest, class with class, faction with faction, and one branch of government with another in a harmonious system of mutual frustration,” as Columbia historian Richard Hofstadter put it in his classic 1948 book, The American Political Tradition. This is the system we have groped toward in the last decade, a system that preserves the framers’ idea that the executive branch should be legally and politically accountable to law and to the American people. Civil libertarians played a big role in getting us to this place, even if they did not get all they wanted.

Jack Goldsmith teaches at Harvard Law School and is a member of the Hoover Institution Task Force on National Security and Law. This article is adapted from his new book, Power and Constraint: The Accountable Presidency After 9/11.