Richard Spencer testifies before the Senate Armed Services Committee during his confirmation hearing in the Dirksen Senate Office Building on Capitol Hill July 11, 2017 in Washington, DC. Chip Somodevilla/Getty Images

The US defense secretary said Monday that he was shocked by the former Navy secretary’s attempt to make a secret deal with the White House over a Navy SEAL’s potential expulsion.

Defense Secretary Mark Esper said he fired former Navy Secretary Richard Spencer after learning of the deal, which he said was „contrary“ to Spencer’s public position.

Visit Business Insider’s homepage for more stories.

Defense Secretary Mark Esper said on Monday he fired Richard Spencer after learning the Navy secretary had secretly tried to broker a deal with the White House allowing Navy Chief Eddie Gallagher to retire and keep his SEAL Trident so long as President Trump did not intervene.

In a briefing with reporters at the Pentagon, Esper said he and Chairman of the Joint Chiefs Gen. Mark Milley were „flabbergasted“ to learn through a senior White House official on Friday that Spencer was seeking a deal without Esper’s knowledge.

„If the president allowed the Navy to handle the case,“ Esper said of the deal, „He would guarantee that Eddie Gallagher would be restored to rank, allowed to retain his trident, and permitted to retire.“

„This proposal was completely contrary to what we agreed to, and contrary to Secretary Spencer’s public position,“ Esper said.

Esper said he informed Trump on Saturday that he lost trust and confidence in Spencer, which Trump supported. Esper then asked Spencer for his resignation on Sunday, and received it within 30 minutes.

Esper Milley Trump Kevin Lamarque / REUTERS

On Sunday, Chief Pentagon spokesman Jonathan Hoffman said in a statement that Esper asked for Spencer’s resignation „after losing trust and confidence in him regarding his lack of candor over conversations with the White House involving the handling of Navy SEAL Eddie Gallagher.“

That breaks from the narrative presented in Spencer’s letter to Trump, in which he hangs his resignation on their differing views on good order and discipline.

„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,“ Spencer wrote.

Esper confirmed on Monday that Spencer „certainly indicated he was probably going to resign“ if he was told to allow Gallagher to retain his trident pin, despite Spencer saying publicly that he had not threatened to resign over Trump’s involvement in Gallagher’s case.

Esper said that he „cannot reconcile the personal statements with the public statements with the written word.“

As for Gallagher, Esper said that Trump gave the order on Sunday that he would retain his trident pin, and he is expected to retire at the end of the month. It’s unclear what fate the three other SEALs who planned to go before the review board will face — Esper said that he asked now-Acting Secretary of the Navy Thomas Modly and Chief of Naval Operations Admiral Michael Gilday for recommendations on how to move forward.

While Esper repeatedly pointed to the importance of following processes within the Department, he recognized that the president, as the Commander in Chief, has every right to do what he wants.

„If folks want to criticize anyone at this point about reaching down into the administrative processes, then simply blame me. I’m responsible at this point — it’s not where I prefer to be, but I’ll own it.“