With minimal reference to Edward Snowden, the former contractor who ushered in a new and unwelcome era for the National Security Agency, General Keith Alexander ended his NSA directorship and his 39-year army career on Friday.

Feted at a retirement ceremony attended by intelligence colleagues, legislators, fellow officers and White House chief of staff Denis McDonough, Alexander hailed the NSA by quoting General Douglas MacArthur’s musings on patriotism, morality and service from his 1962 retirement speech at West Point, which Alexander called “especially applicable with all that has gone on in the past year”.

It was the only reference to Snowden that Alexander permitted himself in a brief speech.

“Thanks for protecting our nation. Thanks for protecting our civil liberties and privacy. Thanks for doing your job when many others would have walked away,” Alexander said.

Alexander came to the NSA in 2005, as one of the service’s first digitally proficient general officers. For most of his tenure he expanded the agency’s powers and influence tremendously, and in 2010 he added to his duties as the first leader of Cyber Command, a new organization devoted to defending military networks and nearly inextricable from NSA.

But Alexander’s run at the NSA will be forever linked to the revelations of its global surveillance dragnets. Snowden’s leaks to the Guardian, the Washington Post, First Look and other news outlets made the NSA infamous worldwide and yielded a consensus domestically against the bulk collection of US phone data. Defense secretary Chuck Hagel said the Snowden leaks had created “one of the most challenging periods” in the NSA’s history.

Still, said James Clapper, the director of national intelligence, about Alexander: “I never heard him complain.”

General Martin Dempsey, the chairman of the Joint Chiefs of Staff, compared Alexander to James Bond.

“Can anyone guess what number he keeps on his parking spot at Fort Meade?” Dempsey said. “007.”

In a sign of NSA’s remoteness from the Defense Department to which it nominally belongs, Alexander outlasted three defense secretaries. Hagel praised Alexander’s “vision, dedication and leadership” during the ceremony, which was held at Fort Meade, the Maryland army base that houses the NSA and Cyber Command.

Hagel said the Defense Department would “maintain an approach of restraint to any cyber operations outside of US government networks”, a claim difficult to reconcile with the NSA and Cyber Command’s technically impressive capabilities for widespread penetration, espionage and disruption of much of the global internet.

A senior defense official told reporters Hagel’s “principle of restraint” applied to espionage and intelligence gathering.

“The principle of restraint is not just for cyber operations that would be conducted by CYBERCOM, but by NSA as well. We think very carefully about the things we do outside of our own networks and the type of repercussions they would have for us, the economy of the United States, our allies and even for those who might even be considered our adversaries,” said the senior official, who would not agree to be named.

Peter Singer, a cybersecurity scholar at the Brookings Institution, said Alexander’s replacement, Vice Admiral Michael Rogers, faced an enormous challenge in restoring the reputation of the NSA.

“We have an immense uphill battle in the post-Snowden, post-Alexander world. It's good that we're now selling a message of restraint, but it's not clear the rest of the world is going to buy it. Therein lies the challenge for the new policymakers inheriting this all,” Singer said.

Defense and intelligence officials say that selling the NSA's message depends on increased transparency as well as reforms. But it is yet to be seen whether increased transparency will correspond with increased truthfulness.

One of Alexander’s few pre-Snowden public appearances outside the Beltway was notable for its lack of candor. In the summer of 2012, Alexander told a Q&A session at the Def Con hacker conference in Las Vegas that “the story that we have millions or hundreds of millions of dossiers on people is absolutely false".

That statement led to a classified exchange of letters involving Senator Ron Wyden, an Oregon Democrat on the intelligence committee, the NSA and the Office of the Director of National Intelligence, and ultimately the infamous testimony from Clapper in which he untruthfully told the Senate panel the government was “not wittingly” collecting data on hundreds of millions of Americans.



Similarly, in the wake of the Snowden leaks, Alexander repeatedly stated, misleadingly, that the bulk collection of US phone data had assisted in uncovering 54 terrorist plots, 13 of which had a “homeland nexus”. Alexander and his deputies would later clarify that NSA’s foreign-focused communications content interception had uncovered the vast majority of those, and that only in one case could the bulk US phone metadata collection possibly be said to have stopped an incident.

By January, after judicial and executive reviews had discounted even that reduced claim, the NSA began saying the value of the bulk phone data collection was more analogous to an “insurance” program.

Def Con did not invite Alexander back in 2013.

In his final months in office, Alexander publicly argued for new cybersecurity legislation that would expand the NSA and Cyber Command’s authority in the name of safeguarding US business networks from foreign attack.

But Alexander acknowledged that the Snowden revelations had cast a pall on the relationships he had sought to build with the US business community.

“Given the current Snowden issues, many of the companies want to distance themselves in part,” Alexander told a Senate panel earlier this month. “But understanding the cyber area, we have to work together. We have to share. We have to understand when they're under an attack.”