Defense Secretary Mark Esper asked for Navy secretary Richard Spencer's resignation on Sunday after learning about a private proposal Spencer made to the White House involving disgraced Navy SEAL Eddie Gallagher, a Pentagon spokesperson told the Washington Post.

The big picture: President Trump set off a storm last week when he reversed Gallagher's demotion, which came after he was convicted for posing with the corpse of a dead Islamic State militant in 2017. Trump then tweeted on Thursday that Gallagher should not be removed from the SEALs. According to the Post, Spencer circumvented Esper and privately told the White House that he would ensure Gallagher would be able to retire as a SEAL as long as White House officials did not intervene in the case.

The New York Times reported on Saturday that Spencer and a top admiral had threatened to resign if Trump blocked the Navy's plans to expel Gallagher from the SEALs. Spencer denied the report.

AP reported Sunday that the White House had informed the Navy it did not intend to intervene in the proceedings against Gallagher.

What they're saying: Trump tweeted on Sunday night after the news broke, "I was not pleased with the way that Navy Seal Eddie Gallagher’s trial was handled by the Navy. He was treated very badly but, despite this, was completely exonerated on all major charges. I then restored Eddie’s rank."

"Likewise, large cost overruns from past administration’s contracting procedures were not addressed to my satisfaction. Therefore, Secretary of the Navy Richard Spencer’s services have been terminated by Secretary of Defense Mark Esper."

Spencer wrote in a letter first reported by CNN that with respect to maintaining order and discipline, it has become clear that he no longer shares the same understanding as the president who appointed him.

"I cannot in good conscience obey an order that I believe violates the sacred oath I took in the presence of my family, my flag and my faith to support and defend the Constitution of the United States," he added.

What to watch: Undersecretary of the Navy Tom Modly will serve as acting Navy secretary. Trump tweeted on Sunday that current U.S. Ambassador to Norway Kenneth Braithwaite will be nominated for the permanent position.

Read Spencer's departure letter