Richard V. Spencer was asked to resign from his post as United States Secretary of the Navy Sunday by Secretary of Defense Mark Esper over his handling of the now controversial military trials of three U.S. servicemen accused of war crimes in Afghanistan and Iraq in the fight against ISIS.

Spencer is the highest-ranking casualty thus far in a battle of wills pitting president Donald Trump and his apparent disregard of the military justice system against the Department of Defense seeking to fairly impose its Uniform Code of Military Justice governing war crimes committed by U.S. servicemen anywhere in the world.

Esper had lost trust and confidence in Spencer over “his lack of candor” over conversations with the White House regarding Gallagher’s case, said the Pentagon in a statement.

The conversations referred to by Esper were triggered by Trump granting clemency to three U.S. soldiers charged with war crimes. Trump claims his clemency will give U.S. troops “the confidence to fight” without worrying about being charged for war crimes later on.

Convicted by military courts was Army 1st Lt. Clint Lorance, who was found guilty of second degree murder in the death of two Afghans. Army Maj. Mathew Golsteyn was to have faced murder charges in 2020 for a similar crime. Special Warfare Operator Chief Edward Gallagher was accused of a number of alleged war crimes, including posing for pictures with an ISIS fighter's corpse. 

In his clemency on Memorial Day, Trump granted Lorance a full pardon for his crimes; Golsteyn was given a similar full pardon while Gallagher had his rank restored to Chief Petty Officer in the U.S. Navy. Gallagher is a SEAL operator.

The Pentagon protested the pardons, arguing Trump's actions will send the message U.S. troops need not worry about following rules of engagement when fighting enemies abroad. Trump's pardon of these soldiers and the U.S. military's failure to investigate and prosecute war crimes are a violation of international humanitarian law, said the United Nations in a statement.

Spencer’s firing was directly caused by Trump's reaction to an administrative investigation by the Trident Review Board to determine if Gallagher should be stripped of his Trident Pin, a symbol of membership in the SEALs.

"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!" Trump tweeted November 21.

Spencer responded to Trump's tweet by saying terminating this probe is only legal via an official written order from the White House. Spencer is said to have threatened to resign if the White House issued such an order. He argued this order will undercut his authority and that of Rear Adm. Collin Green, commander of the SEALs.

At the same time, however, Spencer is said to have privately proposed to White House officials he’d ensure Gallagher was able to retire as a SEAL if the White House didn't issue this order. Esper eventually learned of this private conversation and fired Esper on Sunday because of it.

Sources at the Pentagon said Spencer never informed Esper of his private proposal to the White House. Esper has directed Gallagher retain his Trident pin.

In his letter of resignation, Spencer said he could not, in good conscience obey Trump's order that violates the oath he took to support and defend the Constitution.

Spencer said it had become clear he and Trump no longer share the same concept and understanding of the key principles of good order and discipline.

“The President deserves and should expect a Secretary of the Navy who is aligned with his vision for the future and our force generation and sustainment,” according to Spencer.