Written by Shannon Vavra

Glenn Gerstell, the National Security Agency’s general counsel, is leaving the agency, CyberScoop has learned.

“It was truly an honor to be able to serve this agency and play a part in keeping our nation safe. This has easily been the best job I have had,” Gerstell said in an email. “My earlier private sector legal career was fulfilling, but nothing compares to the satisfaction of public service, especially confronting some of the most critical challenges facing our country – terrorism, aggression by overseas authoritarian regimes and cyber maliciousness.”

After nearly five years spent advising two NSA directors, former NSA Director Adm. Michael Rogers and current NSA Director Gen. Paul Nakasone, Gerstell will be a senior adviser at the Center for Strategic & International Studies (CSIS) starting next month. There, he will write on “the role of technology, coping with a rising China and privacy in the digital era,” he said in the email.

The NSA confirmed his departure to CyberScoop. CSIS did not immediately return request for comment.

Before his work at the agency, he advised various government leaders on critical infrastructure security through the National Infrastructure Advisory Council. He also worked for 40 years at the law firms of Milbank, Tweed, Hadley & McCloy LLP.

Gerstell began working at the NSA in 2015 at the height of the agency’s conversations about civilian privacy and trust in the U.S. government — two years after former NSA contractor Edward Snowden revealed the agency’s surveillance programs and bulk collection of call records to the public.

For months, Gerstell has been painting a bleak picture of the intelligence community’s efforts to counter malicious behavior in the cyber realm. In remarks delivered at the American Bar Association (ABA) earlier this month, he noted “the most pernicious effect of the technological revolution” comes from “the global, border-destroying nature of technology and cyber” and “the advent of cyber maliciousness.”

“It is almost impossible to overstate the gap between the rate at which the cybersecurity threat is getting worse relative to our ability to effectively address it,” Gerstell said. “The simple fact of the matter is that no nation has yet found an effective solution to stop foreign malevolent cyber activity.”

It is not just nation-states’ nefarious cyber-operations that the U.S. intelligence community needs to fear, Gerstell said in a September New York Times op-ed.

“The 40-odd nation-states that today have offensive cybercapabilities will seem a quaint historic artifact when sophisticated tools for cybermischief are in the hands of not only every nation-state but also common criminals around the globe,” he said. “While most nation-states might be careful to limit their cybereffects to economic theft and espionage, pre-battle positioning of beacons and other malware, mischievous interference with elections and public opinion … there is no guarantee that all nations will exercise such care nor that criminals would be deterred.”

The agency declined to comment on who will be replacing Gerstell as general counsel.