Walter Shaub, the director of the Office of Government Ethics who clashed with President Donald Trump's White House, announced Thursday that he will step down.

In a letter to Trump, Shaub said he will resign from the executive-branch watchdog effective July 19, without offering a specific explanation for leaving. He will join the nonpartisan Campaign Legal Center as a senior director for ethics.

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

In a statement released by the Campaign Legal Center, Shaub said "it has become clear to me that we need improvements to the existing ethics program."

His term at the office was set to end next year.

The OGE, an independent executive branch agency that helps officials avoid conflicts of interest, took on more prominence in the Trump administration as a possible check on self-enrichment by government officials. Trump, a businessman with sprawling global holdings, filled the top ranks of his administration with wealthy business people, creating various issues the OGE raised concerns about in the early months of Trump's presidency.

The agency does not have disciplinary power in the executive branch — it can only recommend actions for the White House to take. Shaub's resignation means Trump will get to choose an official in charge of overseeing his administration's ethical issues.

In a statement to NBC News, a White House official said the White House "accepts Mr. Shaub's resignation and appreciates his service." Trump "will be nominating a successor in short order," the official said.

Shaub had publicly called for Trump to sell his businesses, something the president did not do. His sons now run his businesses.

Shaub also recommended that the White House punish Trump advisor Kellyanne Conway in February after she made an apparent pitch for a clothing line from Ivanka Trump, the president's daughter. In addition, he clashed with the administration over a request for copies of waivers granted to officials, some of whom were former lobbyists, to work in the executive branch.

No one in the White House pushed Shaub to leave, he told The Washington Post. He said it was "clear that there isn't more I could accomplish."