Updated

The National Security Agency's top lawyer, who helped managed the agency's response to leaks of its most secret surveillance programs, has left the government.

Raj De (Day) is returning to his former law firm, Mayer Brown, to run a cybersecurity practice. His replacement has not been named.

De arrived at the spy agency three years ago following stints at the White House, the Justice Department and the 9/11 Commission.

President Barack Obama has made modest changes but has left most of the controversial NSA surveillance programs in place, rejecting some of the reforms suggested by his own task force. De played a role in preserving the status quo.

In an interview, De says he wishes the agency had done a better job publicly explaining its role in intelligence collection.