US Defence Secretary Mark Esper has fired the navy's top official over his handling of the controversial case of a Navy SEAL accused of war crimes.
At Mr Esper's request, Navy Secretary Richard Spencer submitted his resignation on Sunday, chief spokesman for the Pentagon, Jonathan Hoffman, confirmed.
Mr Hoffman said Mr Esper had lost trust and confidence in Mr Spencer "regarding his lack of candour" after the navy secretary allegedly proposed a deal with the White House to resolve the matter.
Mr Spencer has not yet commented on the claims.
Last week, Donald Trump waded into the row surrounding the future of chief petty officer Eddie Gallagher - with the president tweeting he would not let the navy remove him from the elite special forces unit.
Gallagher had been demoted in rank and pay grade after being convicted by a military jury of illegally posing for pictures with the corpse of an Islamic State fighter. He had been acquitted of more serious offences including murder.
A navy review panel was set to decide whether Gallagher should remain a SEAL or be stripped of the Trident pin that denotes membership of the elite group.
But Mr Trump has used his authority as commander-in-chief to intervene in the case.
In a series of tweets on Sunday, Mr Trump said he had been unhappy with the navy's handling of the Gallagher case.
"He (Gallagher) 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," the president tweeted.
"Therefore, Secretary of the Navy Richard Spencer's services have been terminated by Secretary of Defense Mark Esper. I thank Richard for his service & commitment.
"Eddie will retire peacefully with all of the honors that he has earned, including his Trident Pin."
In a subsequent tweet, Mr Trump said he would nominate the current US ambassador to Norway and retired navy rear admiral, Kenneth Braithwaite, for the top navy job.
Mr Trump's involvement in the case has raised questions among some current and former military officials about the appropriate role of a commander-in-chief in matters of military justice.
Last Thursday, Mr Trump wrote in a tweet that he would not let the navy remove Gallagher from the SEALs by taking away his Trident pin.
Two days later, Mr Spencer said he did not consider Mr Trump's tweet an order, saying he would need a formal instruction to act.
Mr Spencer added: "I do not interpret what the president does. I do what he says.
"The president of the United States is the commander in chief. He is involved in every aspect of government, and he can make decisions and do things and give orders as he deems appropriate."
Mr Spencer also said the military review should go ahead despite Mr Trump's tweet, saying: "I believe the process matters for good order and discipline."
Listen to Divided States on Apple podcasts , Spotify , and Spreaker
Gallagher's lawyers had accused the navy of trying to remove his SEAL designation in retaliation for Mr Trump's earlier decision to restore his rank.
They also claimed the leadership was guilty of insubordination for defying Mr Trump, although the president has not explicitly pardoned the SEAL for any wrongdoing.