It was already a frantic day in the Donald Trump presidential transition: The incoming president had attacked a reporter at a circus-like press conference, and a series of Cabinet confirmation hearings were producing fireworks.

Then a little-known civil servant took the stage and delivered the most stunning turn of all.

Walter M. Shaub, the director of the previously obscure Office of Government Ethics, was speaking at the staid Brookings Institution, and he lit into the incoming president for his plan to separate himself from his business empire.

Trump had ignored the advice of most outside ethics lawyers, who wanted him to sell all his holdings to avoid conflicts of interest. Instead, Trump announced he would sell nothing and turn the business over to his sons.

Shaub called the plan "wholly inadequate" and said it would leave Trump open to suspicion of corruption.

Then he invited the president-elect to think about sacrifice.

"It's important to understand that the president is now entering the world of public service," he said. "He's going to be asking our men and women in uniform to risk their lives in conflicts around the world. So, no, I don't think divestiture is too high a price to pay to be the president of the United States of America."

Related: Government ethics chief blasts Trump over business plan

The speech on Wednesday astonished some observers in Shaub's field. Lofty speeches about patriotic duty are normally the bailiwick of lawmakers on Capitol Hill, not wonky government lawyers who work behind the scenes and comb through reams of paperwork.

"The whole thing was extraordinary, I think," said Don Fox, a former general counsel and acting director of the ethics office. "No OGE director has ever done anything like that."

Shaub's agency is nonpartisan and advises executive branch officials on how to avoid conflicts. It also picks through the financial records of Cabinet appointees to look for potential trouble spots.

Related: The agency vetting Trump's billionaires

The office has no enforcement power, but Shaub could be in a position to act as a foil to Trump. He was appointed by President Obama, and his term runs into 2018.

Asked what would happen if Trump tried to fire the director, Fox said it was "really an uncharted question." Such a move would almost certainly provoke a backlash, like when House Republicans moved to cripple the ethics office of Congress.

Shaub, 45, earned a history degree from James Madison University and a law degree from American University. He started his career as a staff attorney for the Department of Veterans Affairs and also worked for the Department of Health and Human Services.

He joined the ethics office as a staff attorney early in the George W. Bush administration and has worked there ever since, outside a two-year stint at a federal employment law firm from 2004 to 2006.

"Within the ethics community, his views on conflicts and financial disclosure carry a great deal of weight," said Fox, who worked with Shaub during the Bush and Obama years.

Shaub's office didn't respond to requests by CNNMoney for an interview. But others echoed Fox's assessment of Shaub as a deeply knowledgeable ethics ace.

"He's very well respected by people who know him and his work," said Richard Painter, who occasionally worked with Shaub during his time as an ethics lawyer in the Bush administration.

Norman Eisen, who led ethics initiatives in President Obama's first term and is now a visiting fellow at the Brookings Institution, said Shaub asked to speak about ethics after Trump's press conference.

Related: Trump will leave business but won't sell

The remarks that followed were one of the "great acts of courage," said Eisen, who has been among the fiercest critics of Trump's resistance to drawing a clear line between himself and the business holdings.

Not everyone saw Shaub's turn in the spotlight as such a good idea.

Representative Jason Chaffetz, the Republican chairman of the House Oversight Committee, pointed out in a CNN interview that Shaub was an "Obama donor." Records show Shaub gave $250 to Obama's 2012 re-election campaign.

Chaffetz also demanded that Shaub appear before his committee for an interview. "Your agency's mission is to provide clear ethics guidance, not engage in public relations," he wrote in a letter Thursday.

"I've never seen OGE act this politically," said Howard Schweitzer, the former chief ethics officer of the Export-Import Bank, who was an executive on TARP, the financial crisis bailout program, under Bush and Obama.

"These things are enormously complicated, and I think to some extent this is people inside a bubble that don't take into account the reality of owning a closely held company," said Schweitzer, now managing partner at Cozen O'Connor Public Strategies, a government relations firm.

That was part of the argument Trump and his lawyers gave. They said it would be impossible to turn over the sprawling Trump Organization to anyone on the outside. They also said Trump should not be expected to break apart and sell the great company he built.

Sean Spicer, the incoming White House press secretary, told reporters Thursday that the steps Trump is taking are "frankly extraordinary." Spicer dismissed concerns as "somewhat of a silly discussion" because no law prohibits the president from having a conflict.

The Trump transition team did not immediately respond to a request for comment for this story.

Eisen, Painter and others say Trump's solution is unacceptable and offers no assurance that Trump won't personally profit from the decisions he makes as president.

Shaub's appearance at Brookings was the first time he had spoken publicly about Trump. But behind the scenes, he was prodding the incoming president weeks ago.

Shaub turned out to be the person behind a series of unusual tweets that the Office of Government Ethics sent one day in November, enthusiastically congratulating Trump for divesting himself of his holdings.

Related: Goverment ethics office cheers Trump in string of tweets

Trump had announced no such thing, and the tone of the tweets, which used words like "Bravo!" and "Brilliant!", made reporters wonder whether the office's Twitter feed had been hacked. Angry citizens sent emails accusing the office of letting Trump off the hook.

.@realDonaldTrump - we told your counsel we'd sing your praises if you divested, we meant it. — U.S. OGE (@OfficeGovEthics) November 30, 2016

On Wednesday, Shaub explained himself: He said he was trying to use Trump's favored way of communicating to encourage him to divest.

"While some people got what I was doing," he said, "I think some others may have missed the point."

Trump, too, has stressed that no federal law says he has to do anything about conflicts. But Shaub, borrowing from Trump's own campaign slogan, said in the Brookings speech that he should behave as a role model.

"As we all know, one of the things that make America truly great is its system for preventing public corruption," he said. "The president-elect must show those in government -- and those coming into government after his inauguration -- that ethics matters."

--CNN's Noah Gray and Jordan Nash contributed to this report.