Michael Waltz had all the right credentials to be national security adviser in a normal administration. He was a respected former Green Beret, a strong supporter of Israel and tough on Russia, China and Iran. Maybe that’s what did him in.

Waltz’s ouster on Thursday was cushioned by his appointment as President Donald Trump’s ambassador to the United Nations. That soft landing will play well with Waltz’s many friends abroad but distance him from a White House power struggle in which he never had much influence.

Taking Waltz’s place temporarily as national security adviser will be Secretary of State Marco Rubio, who sources tell me has won the president’s confidence by being deferential, unquestioningly supportive and a frequent weekend visitor with Trump over the past six weeks.

Waltz became a lightning rod for criticism after the “Signalgate” flap in March. Trump was peeved about Waltz’s use of a commercial messaging app for sensitive discussions and the fact that a chat list used to plan strikes in Yemen inadvertently included the editor of the Atlantic magazine, whose number was saved among Waltz’s contacts. And from the beginning, the disciplined Waltz seemed to have poor chemistry with Trump, who has filled his administration with billionaire buddies.

But Washington insiders say Waltz’s ouster was driven in part by a feud that has been smoldering within Trump’s administration since Inauguration Day. That fight pits hawks such as Waltz, sometimes dubbed the “neocons,” against allies of Vice President JD Vance, described as “neo-isolationists.”

The White House national security shake-up comes at an especially awkward time. Steve Witkoff, Trump’s inexperienced special envoy, is trying to broker deals with Russia to end the war in Ukraine and with Iran to curb its nuclear program. Several foreign officials I spoke with Thursday were flummoxed that Waltz, seen as a figure of stability, would be departing with his skilled deputy, Alex Wong, at such a sensitive moment.

The second Trump administration has been characterized by unstinting public loyalty to the president. But this seemingly united front has masked three distinct groups jockeying for power. The first are the MAGA true believers, who are deeply skeptical of what they see as entangling foreign alliances that lead to wars and economic burdens for the United States. In addition to Vance, this group has the backing of Donald Trump Jr., who fills the family consigliere role. Far-right influencer Laura Loomer has acted as an online enforcer for this group.

A second group are traditional Republican internationalists. Waltz was a prominent member of this group, along with Rubio and CIA Director John Ratcliffe. This faction has more limited influence with Trump.

The third faction, probably the most important one, might be described as the “oligarchs.” These are the billionaire friends Trump feels closest to and trusts the most. Witkoff, often described as Trump’s oldest confidant, tops this list. Others are Steve Bessent and Howard Lutnick, respectively the treasury and commerce secretaries. And most visible until recently, DOGE-meister Elon Musk, the wealthiest billionaire of all.

Tension was evident among the groups in two recent events that illustrate the ideological rifts underlying the administration.

First was an attack in a New York Post news story on Wednesday headlined “Steve Witkoff shouldn’t be leading Iran, Russia negotiations, allies and insiders say.” The article quoted an anonymous former Trump aide calling Witkoff a “nice guy, but a bumbling f---ing idiot.”

The article brought a quick response from Trumpworld. Charlie Kirk, a MAGA media voice who often appears with Don Jr., posted on X Wednesday night: “... The anti-Witkoff forces are anti-MAGA.” Loomer, too, has continued agitating against Waltz after helping persuade Trump to fire at least seven National Security Council staffers last month. Shortly after the first reports of Waltz’s ouster, Loomer tweeted the word “SCALP.”

A second illustration of the turmoil is the firing of three top aides to Defense Secretary Pete Hegseth last month. Commentators have cited various factors, from Hegseth’s chaotic management style to concerns over media leaks. But several insiders told me that some of the aides who were fired shared Vance’s skepticism about overuse of American military power and unnecessary foreign conflicts.

This internal disarray comes at a dangerous moment: The Trump administration is trying to broker peace deals with Iran and Russia without imperiling close allies in Israel, Ukraine and Europe. Waltz was an anchor to the traditional Republican world of foreign policy, as is his temporary successor, Rubio.

But Trump is the only fixed pole in his administration. This week, he’s toughening his stance on Russia, signing a security deal with Ukraine and moving toward a nuclear deal with Iran. Next week … well, who can say?

David Ignatius is a Washington Post columnist.