WASHINGTON – The government ethics director who prodded President Donald Trump‘s administration over conflicts of interest is resigning to take a new job.

Walter Shaub, director of the Office of Government Ethics, is joining the Campaign Legal Center, a non-profit in Washington that mostly focuses on violations of campaign finance law.

READ MORE: Donald Trump ripped by ethics czar for tapping sons to run his business

Both Shaub and the Campaign Legal Center posted the news on their Twitter accounts, and Shaub confirmed his move to The Associated Press.

President Barack Obama appointed Shaub, a longtime OGE employee, to director of the office in 2013. His term was set to expire next year. In his resignation letter to Trump, dated Thursday, Shaub wrote that the employees he led “are committed to protecting the principle that public service is a public trust.”

Story continues below advertisement

WATCH: Trump caught in an ethics firestorm

2:10 Trump caught in an ethics firestorm Trump caught in an ethics firestorm

Beginning shortly after Election Day, Shaub and Trump’s attorneys have engaged in an unusual bit of warfare that played out in eight months of OGE tweets, letters between them and OGE responses to congressional requests.

After Trump made it clear in January that he would not sell off his global business empire to avoid the appearance of conflicts of interest, Shaub spoke out.

READ MORE: Ethics reviews for several of Donald Trump’s Cabinet picks are incomplete

He said Trump’s plan to retain financial interests in the Trump Organization while handing over leadership to his adult sons and a senior executive “doesn’t meet the standards” of Trump’s own Cabinet nominees and four decades of previous presidents.

Story continues below advertisement

Since then, the OGE has unsuccessfully asked the White House to punish a senior adviser to the president over inappropriately promoting Ivanka Trump’s fashion line. The office succeeded in pressuring the White House to release information about ethics waivers it has granted to employees seeking to avoid running afoul of rules against interacting with previous employers. However, Shaub objected to White House lawyers handing over undated waivers – suggesting some of them may have been given retroactively.

“It’s become clear to me that changes are needed to strengthen the executive branch ethics program,” Shaub said Thursday. Tweet This

Shaub said his work at the Campaign Legal Center will focus on government ethics, including at the congressional and state level. He said he will work from the outside to strengthen an executive branch ethics program that is designed to help thousands of federal employees avoid conflicts of interest.