The Department of Justice headquarters building in Washington photographed early in the morning. // AP, J. David Ake

Forty years of institutional memory walked out of the Justice Department last month.

Lawyer Douglas Letter joined the DOJ in 1978. For decades, he defended controversial policies advanced by Democrats and Republicans in the executive branch.

Now, he may be suing over them.

Letter, 64, reflected on his long government service on a sunny morning last week at the Georgetown Law Center, where he will be working and teaching national security law.

"My father and several other people in my family were also career public servants," he said, "so I grew up feeling like public service was a calling."

Letter fought for the government — no matter which political party controlled it — through the Reagan and Clinton and George W. Bush presidencies. After the terrorist attacks in September 2001, his docket included cases about treatment of detainees, lethal drone strikes and more.

Asked for his proudest moments, he mentions this one, from the Obama years: "The Obergefell case," he said. "That's the one where the Supreme Court decided that gay marriage was constitutionally protected."

Letter also mentioned his work on the defense of the McCain-Feingold campaign finance act, though, he noted, "In the long run, that didn't work out so well."

For the legal community and Justice Department veterans, news of Letter's departure came as a big surprise.

"Doug has been a real institution at the Department of Justice, and the thought of him not being there any more was hard to fathom," said Bob Loeb, an appellate lawyer at the Orrick law firm who worked with Letter in the government for about 20 years.

Eric Holder, former attorney general under President Barack Obama, tweeted that Letter "personifies what is best about the Justice Department."

As a mark of his reputation, consider the guest list at Letter's going-away party — the chief justice of the United States, John Roberts, was there, as was new Supreme Court Justice Neil Gorsuch.

People who know Letter said they think President Trump's attacks on the Justice Department made it easier for him to leave. He didn't address the president's tweets directly, but he did offer this response to a question about his worries for the institution.

"Yes," he said, "one obviously has to be concerned about the Justice Department and the future of the Justice Department."

Letter said he has seen a lot of politicians run against the bureaucracy in Washington. But, he said, those political appointees often figure out they can learn from public servants — the people who can help them write policies or craft legal arguments that can be defended in court.

"With each new administration," Letter said, "I have legitimate concerns that the new political people will confer with, listen to and be guided by the career professionals."

Letter will be bringing his considerable experience to the Institute for Constitutional Advocacy and Protection at Georgetown. That center is already involved in litigation over Trump's threat to crack down on so-called sanctuary cities and his efforts to block critics on Twitter.

Letter can't participate in those cases. But he said he expects to weigh in on other lawsuits, over bail practices that punish poor people, and a case in Charlottesville, Va., that is trying to prevent militias and paramilitary groups from wreaking more havoc there.

The longtime public servant said he will miss the 60 lawyers in his Justice Department unit.

"It was extremely hard to leave, and I'm hoping they will continue to invite me to play on their softball team, so I can keep up with them — even though I'm clearly the weakest member of the team," he joked.