WASHINGTON — For the first 10 weeks of President Trump’s administration, no adviser loomed larger in the public imagination than Stephen K. Bannon, the raw and rumpled former chairman of Breitbart News who considers himself a “virulently anti-establishment” revolutionary out to destroy the “administrative state.”

But behind the scenes, White House officials said, the ideologist who enjoyed the president’s confidence became increasingly embattled as other advisers, including Mr. Trump’s daughter and son-in-law, complained about setbacks on health care and immigration. Lately, Mr. Bannon has been conspicuously absent from some meetings. And now he has lost his seat at the national security table.

In a move that was widely seen as a sign of changing fortunes, Mr. Trump removed Mr. Bannon, his chief strategist, from the National Security Council’s cabinet-level “principals committee” on Wednesday. The shift was orchestrated by Lt. Gen. H. R. McMaster, Mr. Trump’s national security adviser, who insisted on purging a political adviser from the Situation Room where decisions about war and peace are made.

Mr. Bannon resisted the move, even threatening at one point to quit if it went forward, according to a White House official who, like others, insisted on anonymity to discuss internal deliberations. Mr. Bannon’s camp denied that he had threatened to resign and spent the day spreading the word that the shift was a natural evolution, not a signal of any diminution of his outsize influence.