Defense Secretary Mark Esper asked for the resignation of Navy Secretary Richard Spencer on Sunday saying he lost confidence in him due to the whole controversy regarding a case involving a Navy SEAL who had been accused of war crimes and was championed by President Donald Trump. In a statement, a Pentagon spokesman said that Esper had lost confidence in Spencer “regarding his lack of candor” over private conversations he had with the White House over the case, the Washington Post was first to report. Spencer submitted his resignation.

The New York Times later reported that beyond Esper’s statement, Defense Department officials said Spencer angered Trump when he threatened to resign over how the president was handling the SEALs member.

The firing comes amid lots of controversy surrounding the case of Chief Petty Officer Edward Gallagher, who was acquitted of murder but convicted in July of posing with a corpse. Earlier this weekend, the New York Times reported Spencer and the admiral who leads the SEALs both threatened to resign or be fired if Trump put a stop to the ongoing process to expel Gallagher from the elite unit. On Thursday, Trump had tweeted that “the Navy will NOT be taking away Warfighter and Navy Seal Eddie Gallagher’s Trident Pin.” Spencer later denied he had ever threatened to resign.

At least according to the official telling of events, Esper asked for Spencer’s resignation after learning he had privately told the White House if the administration didn’t interfere with the proceedings against Gallagher then he would make sure Gallagher would be able to retire as a Navy SEAL. Spencer did not inform Esper of his proposal to the White House that also contradicted his public statements on the case. “Unfortunately, as a result I have determined that Secretary Spencer no longer has my confidence to continue in his position,” Esper said. “I wish Richard well.”