The writer, a former assistant attorney general in the Bush administration, is a professor at Harvard Law School and a member of the Hoover Institution Task Force on National Security and Law. His new book, “Power and Constraint: The Accountable Presidency after 9/11,” will be published next month.

A Washington Post-ABC News poll this month revealed extraordinary bipartisan support for President Obama’s counterterrorism policies. Seventy percent of respondents (including a majority of self-identified liberal Democrats) said that they approve of keeping open the Guantanamo Bay detention facility, and 83 percent (including 77 percent of liberal Democrats) said that they approve of Obama’s use of armed drone aircraft against terror suspects overseas. “It’s hard to imagine that Dems and liberals would approve of such policies in quite these numbers if they had been authored by George W. Bush,” noted The Post’s Greg Sargent.

These amazing poll numbers no doubt reflect the fact that some Americans trust Barack Obama more than they did George W. Bush to execute aggressive counterterrorism policies. But a deeper and more important explanation is that our constitutional system of checks and balances has worked extraordinarily well in the past decade to legitimize these policies and to generate a national consensus in support of them.

The poll question misleadingly stated that it was the Obama administration’s “decision” to keep the Guantanamo facility open. But the president pledged in his first week in office to close the facility, and he maintains to this day that he wants to close it. The reason it remains open is that Congress, for the first time in U.S. wartime history, inserted itself into enemy detention policy and effectively barred the president from closing the facility.

Congress, in turn, was responding to the views of the American people. One reason Americans have grown more comfortable with Guantanamo detentions is that the detentions no longer rest on presidential unilateralism and are no longer legally doubtful. This development occurred because the Supreme Court, in another historical first, ruled that the Guantanamo detainees must receive the constitutionally guaranteed writ of habeas corpus. Lower-court judges subsequently reviewed and approved many of the Guantanamo detentions.

Courts became heavily involved in detainee affairs because nongovernmental organizations such as the Center for Constitutional Rights brought novel lawsuits challenging the legality of detentions by the commander in chief. They were supported in this endeavor by the “fourth branch” of government, the press, which got inside the president’s war machine like never before and revealed errors and abuses that spurred courts to act.

The press, in turn, received support from executive-branch lawyers and inspectors general, from government whistleblowers, from Freedom of Information lawsuits and from thousands of networked private actors around the globe who watched U.S. actions in the “war on terrorism” and reported on and criticized what they saw in reports, e-mails, blogs and other media.

These and many other extraordinary checks on the presidency brought significant change to the Bush administration’s original Guantanamo Bay detention policy. Several hundred detainees have been released. The ones still there receive unprecedented legal rights and live in humane conditions. Years of fractious legal and political fights have left us with a lawful, legitimate and secure system of detention that has broad national support.

The same general story explains the continuation of the government’s other aggressive counterterrorism policies. The Supreme Court struck down Bush’s original military commissions but made clear that they could be lawful if properly approved by Congress. Congress subsequently blessed commissions twice, in the process conferring unprecedented (that word again) rights on commission defendants. Not surprisingly, the public broadly supports the use of commissions.

The warrantless surveillance program, once unilateral and controversial, became legitimized through a similar process. The press revealed deep secrets about Bush’s original effort. Congress changed and then blessed the program, which today is closely supervised by a special federal court and by government auditors who regularly report to Congress.

The CIA’s drone program also has been vetted to an extraordinary degree. The press has disclosed numerous details about the nominally covert program, which has enabled a robust public debate about its legitimacy. In addition, government regularly reports closely held details to congressional committees. A federal court also considered the program and ruled that the Constitution left its operation to the political branches rather than judges. The result, at least for now, is wide support for the program.

When Obama continued his predecessor’s counterterrorism policies, most people assumed that the presidency as an institution was out of control. In fact, the opposite is true. Obama continued most of Bush’s policies because other institutions pushed back against Bush’s excesses and then blessed the changed policies. Obama, too, felt the sting of these checks when he pushed too far in trying to close the Guantanamo Bay facility and when he tried to prosecute Khalid Sheik Mohammed in civilian court.

In sum, two presidential administrations with starkly different views about executive power and proper counterterrorism tactics ended up in approximately the same place because constitutional forces more powerful than the aims and inclinations of the presidents were at work.