Donald Trump. Axel Schmidt/Reuters The head of the Office of Government Ethics — the government body which provides ethics oversight of the White House and executive branch — abruptly resigned Thursday.

Walter Shaub, who was appointed to lead OGE by President Barack Obama in 2013, resigned with roughly six months remaining in his five-year term.

Shaub posted the resignation letter he sent to President Donald Trump on his Twitter page. The resignation is effective July 19.

"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," Shaub wrote. "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. I am grateful for the efforts of this dedicated and patriotic assembly of public servants, and I am proud to have served with them."

Shaub told NPR Thursday that "the current situation has made it clear that the ethics program needs to be stronger than it is. At the Campaign Legal Center, I'll have more freedom to push for reform. I'll also be broadening my focus to include ethics issues at all levels of government."

Shaub did not expand on his thoughts related to the "current situation."

During Trump's first few months in office, Shaub has been sharply critical of both the president and his administration's ethical quandaries.

The OGE pushed Trump to fully divest from his businesses ahead of taking office and placing his assets into a blind trust, a move Trump subsequently did not make. He instead opted to put his businesses under the control of his two sons, Eric and Donald Jr., and a senior Trump Organization executive. Shaub criticized this plan during a speech at the Brookings Institution prior to Trump's inauguration, saying it "doesn't meet the standards that the best of his nominees are meeting and that every president in the past four decades has met."

"His sons are still running the businesses, and, of course, he knows what he owns," Shaub said.

Shaub has had a fraught relationship with the administration in the months since. He battled Mick Mulvaney, the director of the Office of Management and Budget, to release the ethics waivers of White House employees, a move with which the White House later complied after initially stonewalling. The release of the waivers showed that several top White House officials, such as counselor Kellyanne Conway and chief strategist Steve Bannon, received ethics waivers for certain areas.

Shaub was later critical of Bannon's waiver, calling it "problematic."

Shaub will be joining the Campaign Legal Center, a nonpartisan election law organization, following the conclusion of his OGE service.

"Walter Shaub is a good, honest man and I congratulate him on a stellar career and wish him well in his future endeavors," Senate Minority Leader Chuck Schumer said in a statement. "The next director of the Office of Government Ethics must demonstrate that they are committed to actually draining the swamp and ensuring administration officials are not using their positions for personal gain."

Whomever Trump appoints to succeed Shaub at OGE will go through a confirmation hearing before the Senate Committee on Homeland Security and Governmental Affairs.

"The next director should also be steadfast in preventing lobbyists and other representatives of special interests from further rigging the system against working families under the cover of darkness, as this administration attempted to do in recent months," Schumer continued. "Democrats in the Senate look forward to thoroughly examining the President’s nominee for this Senate-confirmable position and working to uphold public trust throughout the democratic process."

Rep. Elijah Cummings, the ranking Democrat on the House Committee on Oversight and Government Reform, said in a statement that "today is a sad day for the government’s ethics program." Cummings thanked Shaub "for his many years of dedicated service providing strong, independent, and steady leadership to the Office of Government Ethics, and for his staunch defense of the American people against the recent unprecedented violations of ethical standards by executive branch officials."

The Maryland Democrat also asked House Oversight chair Trey Gowdy, a South Carolina Republican, to invite Shaub to testify before their committee "about the lessons he has learned while leading OGE, including the need to implement substantive reforms to ensure government officials can never put private gain above the public that they serve."

The White House did not immediately respond to a request for comment.