Navy Secretary Richard Spencer is weighing whether to quit over President Trump’s interference in the case of Eddie Gallagher, a Navy SEAL accused of murdering an injured Islamic State fighter in Iraq in 2017.

During an Air Force One flight to Dover Air Force Base on Thursday, military leaders pleaded with Trump to stop intervening in the case in an effort to keep Spencer from resigning, according to NBC News.

Gallagher was acquitted by a military court, but he was found guilty of posing with the dead fighter’s body.

Trump, who restored Gallagher’s rank last week, condemned a board review into whether Gallagher should remain in the elite SEAL corps.

“The Navy will NOT be taking away Warfighter and Navy Seal Eddie Gallagher's Trident Pin. This case was handled very badly from the beginning. Get back to business!” the president tweeted Thursday.

Spencer told the White House that Trump’s tweet was not an official order and he would need to put it in writing. Four officials said Spencer was strongly considering resigning if Trump follows through with a written order to end the investigation.

Rear Adm. Collin Green, who leads the SEALs, also threatened to quit over Trump’s interference, according to the New York Times.

Gallagher, 40, was charged in 2018 for war crimes while he was deployed the previous year in Iraq. As a result of his conviction for posing with a dead ISIS fighter, his rank was reduced from chief petty officer to petty officer.

Trump has intervened in the case several times while Navy leaders sought disciplinary action against Gallagher.