Robert D. Kaplan is the author of 16 books on foreign affairs, most recently “In Europe’s Shadow: Two Cold Wars and a Thirty-Year Journey Through Romania and Beyond.” He is a senior fellow at the Center for a New American Security.

People living in a democracy in an age of electronic communications can be altogether fickle. After a mass casualty attack, they demand total vengeance on the killers and their co-conspirators. But once severe retribution is exacted and normalcy returns, these same people may accuse their security organs of going too far in their methods. The safer they feel, the less tolerant they are regarding the methods of those who keep them safe. Therefore, the art of intelligence gathering is to get the balance right: Be ruthless enough to protect the citizenry but not so ruthless as to fundamentally undermine the values of liberal democracy. Retired Air Force Gen. Michael V. Hayden, who ran the National Security Agency (NSA) and the CIA in virtual succession during the George W. Bush administration, walked this tightrope for a decade. Renditions, interrogations, targeted killings and domestic telephone surveillance were all part of his responsibility. And he defends it all in his blunt, incisive and unapologetic memoir, “Playing to the Edge.”

Hayden’s narrative voice is often calm and devastating — homespun, deadpan and particularly blue collar might be another way to describe it. He deploys a chapter on his Catholic upbringing in Pittsburgh not at the beginning of the book, where people could skim over it to get to the juicy political parts, but in the middle, where it serves as almost a character reference so readers will trust him on other, controversial matters. More so than other Washington memoirs, this book tries to go beyond the community of insiders to appeal to a wider reading public around the country.

Smugness, exasperation and partisanship are certainly apparent but kept generally in low gear — except when Hayden writes about Congress or the media. He complains that while lawmakers were “accusing us of incompetence,” civil libertarians were characterizing the same officials as “omniscient.” He asserts that he sometimes had more fruitful meetings about the CIA’s interrogation program with the leftist Europeans of the International Committee of the Red Cross (ICRC) than with Congress because the ICRC’s “passion for secrecy . . . rivals the agency’s.”

Hayden writes that despite all the attacks, “in the end, the Congress of the United States had no impact on the shape of the CIA interrogation program going forward. Congress lacked the courage or the consensus to stop it, endorse it, or amend it.” And yet, contradicting himself, he also writes that various forms of oversight “had finally succeeded in making” the business of detention and interrogation “so legally difficult and so politically dangerous to grab and hold someone that we would simply default to the kill switch to take terrorists off the battlefield.” In other words, targeted drone strikes were partly a foster child of media and congressional outrage over interrogations.

"Playing to the Edge: American Intelligence in the Age of Terror" by Michael V. Hayden (Penguin )

Ironically, Hayden and the interrogators had emotionally complex reactions to their prisoners. Memoirs written by interrogators often note a bond between themselves and the terrorists they had to repeatedly question. Seeing a poignancy in the “adolescent artwork” of senior al-Qaeda figure Abu Zubaida on the Styrofoam cup used for his lunch, Hayden writes, “You can only dehumanize an enemy from a distance.”

As for the media, he describes the White House press room as a “snake pit,” where the late Helen Thomas “kept up a mumbled growl at me from her front-row seat with sounds that may have contained a question.” Other journalists — Tim Weiner, Jane Mayer, and obviously Edward Snowden allies Glenn Greenwald and Laura Poitras — are described, as you might expect, as “hopelessly agenda-driven.”

Hayden is at his best not when he is attacking or defending, but when he is simply explaining the challenge of an intelligence professional in the postmodern era. Unlike the Cold War, whose Soviet tank divisions were difficult to hide, on the new battlefield the “enemy was relatively easy to kill. He was just very, very hard to find. . . . That’s why later, when some intelligence programs became controversial, I argued that restricting our intelligence in the current effort was like unilateral disarmament.” Moreover, preventive counterterrorism was about dealing, sometimes violently, with the “not-yet-guilty,” and that raised all sorts of ethical questions.

Concomitantly, there was a technological revolution underway. “With little debate, we went from a world of letting radio waves serendipitously hit our antennas to what became a digital form of breaking and entering,” Hayden writes. Describing the Stuxnet virus, which disabled about 1,000 Iranian centrifuges, he notes: “Someone had just used a weapon composed of ones and zeroes, during a time of peace, to destroy what another nation could only describe as critical infrastructure. . . . It felt to me a little bit like August 1945. Mankind had unsheathed a new kind of weapon. Someone [Hayden doesn’t say who] had crossed the Rubicon.”

Crossing the Rubicon meant entering a high-technology universe of complexity and even abstraction, which sometimes makes it hard to describe highly technical and subtle issues. To wit, Hayden spends many pages trying to explain how the NSA’s massive data-collection program did not violate civil liberties: Rather than listen to individual calls, it sought out suspicious patterns from millions of calls. And when suspect foreigners made phone calls outside the United States — calls that at one point or another intersected with a U.S.-based phone number — only then was additional action taken under strict legal guidelines. In publicly fighting these privacy battles, Hayden, who served mainly Republican administrations, often had allies among Democrats who were national security types and enemies among Republican libertarians.

Hayden rejects the notion that the Abbottabad raid that killed Osama bin Laden in May 2011 “poisoned” the relationship between the United States and Pakistan. “It didn’t. It merely tore the veil off.” Indeed, Pakistan was less a “frenemy” than a classic enemy state. Hayden’s weekly briefings to Bush late in his second term had as their theme the growing and brazen al-Qaeda footprint in Pakistan’s tribal areas bordering Afghanistan. If he could boil down his briefings to a few words, it would be: “Knowing what we know now, there will be no explaining our inaction after the next attack.” The aggressive program of drone strikes, for which the Obama administration especially deserves much credit, was essentially born in that realization.

This is a pessimistic book, but while policymakers tend to be optimists, intelligence agents trend toward the reverse. As former CIA director Robert M. Gates once said, when an intelligence analyst stops to smell the flowers, he quickly looks around for the hearse.

Playing to the edge
American Intelligence in the Age of Terror

By Michael V. Hayden

Penguin Press. 448 pp. $30