Walter Shaub, the director of the U.S. Office of Government Ethics, on Thursday announced his resignation from the position to join Washington, D.C. watchdog group the Campaign Legal Center (CLC) as senior director of ethics beginning on July 19.

Shaub, who was appointed by former President Barack Obama to a five-year term in 2013, has been publicly critical of President Donald Trump's handling of business conflicts since his election. The OGE under his guidance was vocal in encouraging the president to sell his business interests, which he has declined to do. 

Shaub in his resignation letter called it "the great privilege and honor of my career" to lead the OGE and the executive branch's ethics community. "They are committed to protecting the principle that public service is a public trust, requiring employees to place loyalty to the Constitution, the laws, and ethical principles above private gain," he wrote. The italicized emphasis is his.

pic.twitter.com/x9TsOKABZ7

— Walter Shaub (@waltshaub) July 6, 2017

In a press release announcing his decision to join the Campaign Legal Center, Shaub took a swipe at Trump. "In working with the current administration, it has become clear to me that we need improvements to the existing ethics program," he said. 

Shaub told The Washington Post he was not leaving the OGE under pressure and that no one in the White House urged him to leave. But he said he felt he had reached the limit of what he could achieve in the administration under the current framework.

"It's clear that there isn't more I could accomplish," he said.

Shaub and the OGE clashed with the Trump White House on more than one occasion. The office recommended the Trump administration take disciplinary action against adviser Kellyanne Conway after she encouraged viewers to "go buy Ivanka [Trump's] stuff" in a television appearance. The OGE has also fielded requests from Democratic lawmakers that it look into the dealings of Carl Icahn, the billionaire activist investor who is an informal adviser to Trump.

And, of course, Shaub and the agency were fiercely critical of Trump's plans for his businesses. The president has refused to divest from his business interests or create a blind trust, instead leaving his two eldest sons in charge of his companies and promising to limit his access to information. 

"Stepping back from running his business is meaningless from a conflict of interest perspective," Shaub said in a January speech at the Brookings Institution in Washington. 

The OGE mocked Trump on Twitter after the election about his businesses. 

.@realDonaldTrump OGE applauds the "total" divestiture decision. Bravo!

— U.S. OGE (@OfficeGovEthics) November 30, 2016

.@realDonaldTrump Bravo! Only way to resolve these conflicts of interest is to divest . Good call!

— U.S. OGE (@OfficeGovEthics) November 30, 2016

The Campaign Legal Center, where Shaub will now work, is a nonpartisan organization representing the public interest to protect and strengthen the democracy of the United States. It has taken on a range of issues over the span of more than a decade. Some of its recent efforts include pressuring the Federal Election Commission to investigate alleged campaign finance violations committed by both the Trump and Hillary Clinton presidential campaigns and suing the Justice Department for records on its private prison decisions.

Senator Elizabeth Warren (D-MA) called Shaub's resignation "deeply unnerving" in a statement. "Despite swimming for months in the toxic swamp of ethics problems at every level of the Trump Administration, Walter Shaub has done exactly what a nonpartisan ethics official is supposed to do -- put the law first. The Senate is responsible for confirming the new head of this post-Watergate ethics watchdog, and every senator -- regardless of party -- should insist upon a tough, fiercely independent replacement who will follow Shaub's example of enforcing the law, even in the face of relentless pressure from the Trump Administration to ignore ethics rules," she said.

--Updated with statement from Elizabeth Warren.