Defense Secretary Mark Esper on Sunday, Nov. 24, terminated the service of the Navy’s top official for allegedly proposing a deal with the White House behind Esper’s back to retire Navy SEAL Eddie Gallagher.

At Esper’s request, Navy Secretary Richard Spencer submitted his resignation on Sunday, said the chief spokesman for the Pentagon, Jonathan Hoffman.

Esper said he that recommended to the White House that Trump nominate as Spencer’s successor the current U.S. ambassador to Norway, Kenneth Braithwaite, a retired Navy rear admiral.

President Donald Trump on Nov. 24 also explained the Navy Secretary’s resignation.

“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,” he tweeted.

On Nov. 16, the president ordered a promotion for Special Warfare Operator 1st Class Edward Gallagher, the Navy SEAL convicted of posing with a dead ISIS captive in Iraq in 2017. Gallagher was in line for a promotion before he was prosecuted, but he lost that and was reduced in rank after the conviction.

Navy Special Operations Chief Edward Gallagher (C)walks with his wife, Andrea Gallagher and adviser, Bernard Kerik as they leave a military court on Naval Base San Diego, on July 2, 2019, in San Diego. A military jury acquitted the decorated Navy SEAL of murder in the killing of a wounded ISIS captive under his care in Iraq in 2017. (Gregory Bull/AP Photo)

President Trump continued his Sunday tweet, “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.”

The president expressed his gratitude for Spencer’s service and introduced the new secretary of the Navy.

“I thank Richard for his service & commitment. Eddie will retire peacefully with all of the honors that he has earned, including his Trident Pin. Admiral and now Ambassador to Norway Ken Braithwaite will be nominated by me to be the new Secretary of the Navy. A man of great achievement and success, I know Ken will do an outstanding job!” he said.

On Wednesday the Navy notified Gallagher that he would face a Navy SEAL review board to determine if he should be allowed to remain in the elite force.

In a statement issued by Hoffman, Esper said he had lost “trust and confidence” in Spencer after learning that the Navy secretary had “privately” proposed to the White House that Gallagher be allowed to retire in his current rank and without losing his status as a SEAL. Esper said that in previous conversations with Spencer about the Gallagher matter, Spencer had not told Esper of his proposal to the White House.

 Acting Defense Secretary Richard Spencer listens during a Cabinet meeting in the Cabinet Room of the White House, on July 16, 2019. (Alex Brandon/ AP Photo)

Esper faulted Spencer for a “lack of candor” on the matter.

A spokeswoman for Spencer, Navy Cmdr. Sarah Higgins, said Spencer had no immediate comment.

Esper also directed on Sunday that Gallagher be allowed to retire at the end of this month, and that the Navy review board that was scheduled to hear his case starting Dec. 2 be canceled, Hoffman said. At Esper’s direction, Gallagher will be allowed to retire as a SEAL at his current rank, Hoffman said.

In the written statement, Esper said of Spencer: “I am deeply troubled by this conduct shown by a senior DOD official. Unfortunately, as a result I have determined that Secretary Spencer no longer has my confidence to continue in his position. I wish Richard well.”

Includes reporting from the Associated Press