The US navy's top official has taken a parting shot at US President Donald Trump after he was fired over his handling of a disciplinary case involving a navy SEAL.
Defence Secretary Mark Esper asked for the resignation of Navy Secretary Richard Spencer, and Mr Spencer submitted it on Sunday, News.com.au.
In a letter acknowledging he was leaving the job, Mr Spencer said he "cannot in good conscience" obey an order he believes "violates the sacred oath" he took, and that he and Mr Trump were at odds on the "key principle of good order and discipline".
"Good order and discipline is what has enabled our victory against foreign tyranny time and time again," the letter read.
"Through my Title Ten Authority, I have striven to ensure our proceedings are fair, transparent and consistent, from the newest recruit to the Flag and General Officer level.
"Unfortunately it has become apparent that in this respect, I no longer share the same understanding with the Commander in Chief who appointed me, in regards to the key principle of 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."
The letter goes on: "The President deserves and should expect a Secretary of the Navy who is aligned with his vision for the future of our force generation and sustainment."
The firing was a dramatic turn in a long-running controversy involving Navy Chief Petty Officer Edward Gallagher, whose case has been championed by Mr Trump.
In a series of tweets, the President said he was "not pleased with the way that Navy Seal Eddie Gallagher's trial was handled by the Navy", saying he was "treated very badly".
Gallagher was convicted of bringing discredit to the armed services after posing next to a dead Islamic State fighter's body while deployed to Iraq in 2017. He was demoted before Mr Trump intervened last week and ordered the navy to restore Mr Gallagher's rank.
Mr Esper also directed that Mr Gallagher be allowed to retire at the end of this month and a navy disciplinary board that was scheduled to hear his case starting December 2 be cancelled, Mr Hoffman said.
At Mr Esper's direction, Mr Gallagher would be allowed to retire as a SEAL at his current rank, Mr Hoffman said.
Mr Hoffman said Mr Esper lost trust and confidence in Mr Spencer "regarding his lack of candour" over conversations with the White House involving the handling of the SEAL case.
"I am deeply troubled by this conduct shown by a senior DOD official," Mr Esper said in a written statement issued by Mr Hoffman. "Unfortunately, as a result I have determined that Secretary Spencer no longer has my confidence to continue in his position. I wish Richard well."