Donald Trump’s chief strategist Steve Bannon just lost his permanent seat on the National Security Council, restoring power to members the president had previously downgraded.

In a presidential memorandum issued Tuesday, Trump removed Bannon from the National Security Council’s “principals committee,” or members that have a standing invitation to every meeting, Bloomberg reported. The reorganization also elevated National Intelligence Director Dan Coats and the chairman of the Joint Chiefs of Staff, Gen. Joseph Dunford, as members of the principals committee.

Trump’s previous reorganization of the council through a January presidential memorandum had downgraded top intelligence officials’ positions to attend meetings only when the discussion directly related to their responsibilities. Former Defense Secretary Robert Gates, who advised Trump during the transition last winter, called that move a “big mistake.”

Trump also added United Nations Ambassador Nikki Haley, CIA Director Mike Pompeo, and Energy Secretary Rick Perry to the principals committee. (The Department of Energy looks after America’s nuclear stockpiles.)

Going forward, National Security Adviser H.R. McMaster, who replaced Michael Flynn in February, will set the agenda for both the National Security Council and the Homeland Security Council, removing some power from Homeland Security adviser Tom Bossert.

Trump surprised many on Capitol Hill and in the intelligence community when he named Bannon, the former head of Breitbart News, to the committee while diminishing the role of the joint chiefs of staff. Sen. John McCain of Arizona called it a “radical departure from any National Security Council in history.”

Bannon’s credentials didn’t seem to fit: Though he served as a surface warfare officer and an admiral’s aide in the Navy, the majority of his career, until his appointment to the Trump administration, had been spent in the business world as an investment banker and political agitator.

In contrast, most members of the principals committee are Cabinet-level people and high-ranking military officers.

Trump later privately complained that he wasn’t fully briefed on the details of the executive order before he signed it, according to The New York Times. Other anonymous White House aides tried to explain that downgrading the director of national intelligence and the chairman of the joint chiefs had been a copy-and-paste error.

Trump’s reorganization looks like a success for McMaster, who encountered resistance when he entered the White House in February. McMaster counseled the president to stop using the term “radical Islamic terrorism,” according to Politico, but Trump rejected that advice and used the term in his first speech to a joint session of Congress. Trump also overruled McMaster’s decision to reassign the National Security Council’s senior director for intelligence programs, 30-year-old Ezra Cohen-Watnick, after the young aide appealed to Bannon and Trump’s son-in-law Jared Kushner.

Cohen-Watnick has since become embroiled in the controversy over Trump’s unproven claims that President Barack Obama wiretapped his presidential campaign last year. After the White House counsel’s office reportedly told Cohen-Watnick to stop conducting an independent investigation into the Obama administration, several officials told the New York Times he helped provide information he found to Republican Rep. Devin Nunes, the chairman of the House Select Committee on Intelligence, who promptly went public with some of it.

But since the initial turbulence, McMaster has replaced previously announced hires with his own picks and has now gained authority in this latest reorganization of the National Security Council.