NSA Deputy Director Richard Ledgett answers questions during the Senate Intelligence Committee hearing on the House-passed Foreign Intelligence Surveillance Act reform bill while on Capitol Hill in Washington, June 5, 2014. REUTERS/Larry Downing

WASHINGTON (Reuters) - The deputy director of the U.S. National Security Agency, the intelligence agency in charge of electronic surveillance and code-breaking, is retiring, an NSA spokesman said on Friday.

Richard Ledgett, who just turned 59, will retire in the spring, spokesman Michael Halbig said in an emailed statement. “It has been anticipated that he would retire in 2017 and he decided the time is right this spring after nearly 40 years of service to the nation.”

Ledgett played a central role in the agency’s response to massive leaks of U.S. surveillance programs by former NSA contractor Edward Snowden. Ledgett is among the many top U.S. intelligence officials who have announced they are leaving since Donald Trump’s victory in the Nov. 8 election.

In the UK, the head of NSA’s British counterpart agency GCHQ, Robert Hannigan, announced two weeks ago that he was stepping down for family reasons.

The NSA has faced continued challenges since Snowden’s 2013 revelations, believed to be the largest leak in the secretive agency’s 65-year history.

Another NSA contractor, Harold Thomas Martin, is facing espionage charges for allegedly stealing vast amounts of classified information.

In November, the head of the Pentagon and the U.S. intelligence community recommended to then-President Barack Obama that NSA’s director, Navy Admiral Michael Rogers, be removed from his post, sources familiar with the matter said.

Obama took no action in the matter, which the Washington Post first reported.