Top US general Mark Milley retired on Friday after a four-year tenure, saying in a speech that US troops take an oath to the Constitution and not a "wannabe dictator," an apparent swipe at former President Donald Trump.
Milley was hailed by President Joe Biden as a sage advisor and as a warrior who served in combat zones from Afghanistan and Iraq to Panama and Haiti.
Milley's tenure included the killing of Islamic State head Abu Bakr al Baghdadi in 2019 and providing military assistance to Ukraine's defense against the invasion by Russia in February 2022.
But it also included the chaotic withdrawal from Afghanistan two years ago and a rocky relationship with Trump.
Troops take an oath to the nation, not the leader
Milley said that troops take an oath to a constitution and not a "wannabe dictator," in an apparent reference to Trump that drew an audible reaction from some in the audience.
Trump has been criminally charged with trying to overturn Biden's 2020 election victory.
"We don't take an oath a king or queen or a tyrant or dictator. We don't take an oath to a wannabe dictator. We don't take an oath to an individual. We take an oath to the Constitution," Milley during a ceremony at Joint Base Myer-Henderson Hall near Washington.
Trump later in the day lashed out at him with a series of insults, calling Milley, a Princeton University graduate, "Slow moving and thinking" and a "moron."
"Look at his words - STUPID & VERY DANGEROUS!" Trump wrote on his Truth Social platform.
Biden called Milley "unflinching in the face of danger," and said he "once ran across a bridge booby-trapped with mines to stop two battle tanks evacuating wounded troops from driving across it."
"Mark, your partnership has been invaluable to me," Biden said.
Milley handed over command to Air Force chief General Charles Q. Brown in an event featuring marching bands and a red-coated fife-and-drum corps.
Brown is only the second Black officer to become chair of the Joint Chiefs of Staff, after Colin Powell two decades ago.
Biden said Milley served in war zones as part of his long military service and had a "chest full of medals to show for it."
In his remarks, Defense Secretary Lloyd Austin recalled a time during the Iraq war when he and Milley were serving in Baghdad and their vehicle was damaged when it was hit by an improvised explosive device while en route to a hospital to see a wounded soldier.
"'Has this happened to you before?'" Austin said he asked Milley. "And he said, oh yeah, I've been blown up about five times now.'"
Rocky relationship with Trump
Milley took the reins in 2019 after being nominated by Trump, but soon found himself having to balance the need to maintain his relationship with him without appearing to be political.
In 2020, he publicly apologized for joining Trump as he walked from the White House to a nearby church for a photo opportunity after authorities cleared the way of protesters using tear gas and rubber bullets.
Milley said on Wednesday he would take measures to protect his family after Trump suggested he had colluded with China in an act he said would have once warranted death.
Brown is a self-described introvert whose public persona contrasts sharply with the outgoing Milley, a loquacious Boston native.
Brown told the audience that his goal will be to deter aggression and "fight when called upon." He said the US military "must focus on modernizing" with new concepts and approaches.
The promotion of Brown, a former fighter pilot with experience in the Pacific, meant Black Americans will hold the top two positions at the Pentagon for the first time - a major milestone for an institution that is diverse in its lower ranks but largely white and male at the top.
Biden appointed Austin to become the first Black US secretary of defense, the top civilian position at the Pentagon.