WASHINGTON — President Trump has signed an executive order removing his chief political strategist, Steve Bannon, from a key national security post.

The move also restores the director of national intelligence, CIA director, and chairman of the Joint Chiefs of Staff to full participation on the National Security Council's principals committee, the panel that Bannon previously had a seat on.

A senior White House official confirmed the move, saying that Bannon was given the post as a check on former national security adviser Michael Flynn. But Flynn was fired in February after misleading Vice President Pence about the substance of his discussions with the Russian ambassador after attending only one meeting, said the official, who spoke on condition of anonymity to discuss a personnel matter.

Lt. Gen. H.R. McMaster, the new national security adviser, will be given more control over the council and its agenda. Trump's decision to reorganize the principals committee came at McMaster's urging, the official said.

Trump signed the executive order, known as a national security presidential memorandum, on Tuesday. But the White House did not announce the move, and it didn't come to light until the order was filed with the Office of the the Federal Register on Wednesday.

Trump's decision in January to include Bannon in National Security Council deliberations was controversial. Although he served as a junior officer in the Navy Reserve, he had little national security experience. He came to the White House via the Trump campaign and, before that, as the executive chairman of Breitbart News, a website that often gave voice to his conservative, nationalistic ideas on trade and immigration.

Democrats seized on the removal of Bannon, who has been a frequent target of their criticism. Rep. Barbara Lee, D-Calif., said Trump deserves no credit for removing him. “His twisted ideology shouldn’t have been welcomed in the first place,” she tweeted.

Rep. Ted Lieu, D-Calif., also weighed in on Twitter, noting Bannon’s lack of national security experience in the first place. “Why all this rationality now?” Lieu asked about the removal.

The move also establishes the director of the CIA as a full member of the powerful principals committee and adds him to the NSC, where he had not been included in the original Jan. 27, 2017, memorandum.

“The Director of National Intelligence and the Chairman of the Joint Chiefs of Staff, as statutory advisers to the NSC, shall also be regular attendees, as will the Director of the Central Intelligence Agency,” the new memorandum states.