President Trump’s new national security adviser, Army Lt. Gen. H.R. McMaster, just made his first big power play: undoing one of the administration’s most controversial decisions by removing White House chief strategist Steve Bannon from the National Security Council.

Bannon had been the first White House political adviser ever appointed to the principals committee of the NSC, an exclusive body charged with giving Trump unvarnished advice about literal life-and-death national security issues. Now Bannon’s short tenure there has come to an end.

This is a big and important move — and one that could bode well for Trump’s ability to navigate thorny global challenges ranging from the carnage in Syria, where Bashar al-Assad just gassed his own people, to North Korea’s explicit talk of using nuclear weapons against the US and its allies in Asia.

There are two things to cheer here.

First, Trump’s willingness to sideline one of his closest aides at McMaster’s recommendation suggests the new national security adviser’s influence within the administration is rapidly growing. That’s a very good thing: McMaster is widely respected, with a nuanced view of how to confront Islamist terrorism that is directly at odds with Bannon’s stated and dangerously simplistic belief that the US is locked in an existential conflict with Islam itself.

Second, the Bannon move comes alongside a broader NSC shake-up that restores the traditional roles, and power, of the chairman of the Joint Chiefs of Staff and the director of national intelligence. Under all previous presidents, both of them had attended all NSC meetings. When Trump first elevated Bannon, by contrast, the president said the two would only come when “issues pertaining to their responsibilities and expertise are to be discussed.”

Until Wednesday, that had meant a political operative with zero national security or foreign policy experience had the same status as the heads of the Pentagon and the State Department — and in some ways outranked the nation’s top military officer and the head of the entire intelligence community.

That, thankfully, is no longer the case.

Trump just undid one of his biggest mistakes

Bannon’s initial appointment had raised eyebrows across Washington and in allied capitals around the world, as presidents of both parties have historically worked hard to draw a line between domestic political considerations and the life-and-death questions faced by the NSC.

That’s because the political and national security imperatives facing the body — created in 1947 and staffed by hundreds of civilian, military, and intelligence officials — are often at odds with each other.

In 2007, for instance, the Bush administration began debating whether to “surge” tens of thousands of American reinforcements to Iraq, where the worsening civil war had triggered unprecedented levels of carnage. Bush’s military advisers believed sending more troops was the only way to turn around a failing war, but the notion of doubling down on what many Americans saw as a lost cause had little public support.

Former US Ambassador Ryan Crocker, who participated in the NSC deliberations from his embassy in Baghdad, told me in late January that Bush might not have made the decision to order the reinforcements if a prominent political adviser like Bannon had been sitting at the table and thinking solely in terms of domestic political considerations.

“If we had that model during Iraq, it would have been a very different outcome, because politically the surge was so unpopular at home,” Crocker told me at the time.

That dynamic was particularly problematic for Trump, a president who gets most of his information from right-wing media outlets like Fox News and is preoccupied with his own popularity. One could have easily envisioned Bannon using his seat at the NSC to advocate for a needlessly aggressive military response to, say, Iran because he thought it would give Trump a boost by having Americans rally around the flag.

Bannon also echoes and magnifies some of the president’s worst instincts, from his “Muslim ban” to his continued references to radical Islamic terrorism (a phrase McMaster has tried to bar from NSC deliberations). Bannon losing his NSC seat means he may have a harder time maintaining policies that McMaster believes to be detrimental to US national security because they alienate American allies throughout the Arab and Muslim worlds.

There’s one more thing to celebrate. Trump operates his White House on a zero-sum model, where there are competing power centers and where one aide gaining influence almost always means another one is losing theirs. That means the Bannon move is as much about McMaster’s growing role as it is about Bannon’s shrinking one.

McMaster is one of the adults in the room. Now he gets to reshape the NSC in his image.

In a statement Wednesday, Bannon tried to portray his removal in the most positive possible light, saying in a statement to the Wall Street Journal that “Susan Rice operationalized the NSC during the last administration. I was put on to ensure that it was de-operationalized. General McMaster has returned the NSC to its proper function.”

Rice — who has now been ensnared in the raging controversy over Trump’s baseless wiretapping allegations — was President Obama’s final national security adviser.

She was succeeded by Michael Flynn, a reactionary former Army general with troublingly Islamophobic views who was fired after less than a month in office for lying to Vice President Mike Pence about his contacts with the Russian ambassador to the US. Flynn, in turn, was replaced by McMaster — a man who is in many ways the polar opposite of both him and Bannon.

Take the challenges posed by ISIS and other Islamist terror groups, one of the defining challenges of the Trump era.

During the campaign, Trump talked about “bombing the shit” out of ISIS, while Bannon has talked about his belief that the US was “at the beginning stages of a global war against Islamic fascism.”

McMaster, who has a PhD from the University of North Carolina, has a far more sophisticated worldview shaped, in part, by his success in pacifying the insurgent-ridden city of Tal Afar. Unlike many generals at the time, McMaster emphasized Arabic language skills and building relationships with residents of the city on the theory that insurgents can’t survive without a friendly population to hide in.

Since ascending to his NSC post in late February, McMaster has worked to sideline Flynn loyalists like Deputy National Security Adviser K.T. McFarland, a former Fox News analyst whose last government experience was in the Reagan administration. CNN reported last weekend that she had been offered the post of US ambassador to Singapore, which would remove her from McMaster’s NSC.

In her place, McMaster elevated Dina Powell, a young Arabic-speaking veteran of the State Department and Goldman Sachs who has close ties to Ivanka Trump and Jared Kushner, Trump’s seemingly all-powerful son-in-law. Kushner is reported to have an increasingly tense relationship with Bannon, which means he could have played a role in helping sell the president on his ouster.

In addition to being arguably the president’s most trusted and influential adviser, Kushner also serves as Trump’s unofficial hatchet man. And all eyes are on him as White House insiders predict a broader staff shake-up amid rising tensions between him and Bannon.

McMaster has also told the NSC staff that he opposed the term “radical Islamic terrorism” — a favorite Trump phrase — because it mistakenly implies the militants are being true to their religion and antagonizes Arab and Muslim allies in the fight against ISIS and other terror groups.

The president has continued to use the term, so there are clear limits to McMaster’s ability to sway him. All of that said, words are one thing, actions another. And on one of the most substantive of all issues — the makeup of the NSC —- McMaster is increasingly getting his way. That’s bad news for Bannon, but potentially good news for Trump’s foreign policy.