His removal is a victory for Mr. Kelly, a retired Marine Corps general whose mission is to impose discipline on White House personnel. A caustic presence in a chaotic West Wing, Mr. Bannon frequently clashed with other aides as they fought over trade, the war in Afghanistan, taxes, immigration and the role of government.
In an interview this week with The American Prospect, Mr. Bannon mocked his colleagues, including Gary D. Cohn, one of the president’s chief economic advisers, saying they were “wetting themselves” out of a fear of radically changing trade policy.
Mr. Trump had recently grown weary of Mr. Bannon, complaining to other advisers that he believed his chief strategist had been leaking information to reporters and was taking too much credit for the president’s successes. The situation had become untenable long before Friday, according to advisers close to Mr. Trump who had been urging the president to remove Mr. Bannon; in turn, people close to Mr. Bannon also were urging him to step down.
By Friday night, Mr. Bannon was already back at the far-right Breitbart News, chairing an editorial meeting at the organization he helped run before joining Mr. Trump’s campaign and where he can continue to advance his agenda.
Mr. Bannon can still wield influence from outside the West Wing. He believes he can use his perch at Breitbart — which has given a platform to the so-called alt-right, a loose collection of activists, some of whom espouse openly racist and anti-Semtic views — to publicly pressure the president.
And he may still play an insider’s role as a confidant for the president, offering advice and counsel, much like other former advisers who still frequently consult with Mr. Trump. Mr. Bannon had formed a philosophical alliance with Mr. Trump, and they shared an unlikely chemistry.
Mr. Bannon has indicated to people that he does not intend to harm Mr. Trump and he has promised to be somewhat reserved about other administration officials, including Jared Kushner, Mr. Trump’s son-in-law and senior adviser, and his wife, Ivanka Trump, the president’s daughter.
“In many ways I think I can be more effective fighting from the outside for the agenda President Trump ran on. And anyone who stands in our way, we will go to war with,” Mr. Bannon said on Friday.
But his former colleagues in the West Wing are uncertain how long that will last.
Joel Pollak, a Breitbart executive, tweeted after Mr. Bannon’s departure was made public a single word with a hashtag: “#WAR.” Mr. Bannon called reporters to suggest Mr. Pollak had gone too far, but he also acknowledged his own disappointment at departing the White House.
He told The Weekly Standard: “The Trump presidency that we fought for, and won, is over. We still have a huge movement, and we will make something of this Trump presidency. But that presidency is over. It’ll be something else. And there’ll be all kinds of fights, and there’ll be good days and bad days, but that presidency is over.”
Still, allies of the president predicted that Mr. Bannon’s ouster would help Mr. Trump’s agenda.
“I think it’s going to be good for both Steve and for the president,” said Christopher Ruddy, the chief executive of Newsmax Media who has known the president for years.
“The president has a major hurdle in the fall, I think, in getting legislation passed,” Mr. Ruddy said. He cited several lawmakers who had told the White House “that they had a real problem with Steve because of Breitbart, and Breitbart’s been a thorn in the side for a lot of congressional Republicans.”
The president has struggled to overcome the dysfunction that has plagued his administration. Bitter feuds among aides were frequently showcased on cable news and in the pages of newspapers. Mr. Bannon was among those suspected of repeatedly leaking the details of internal White House debates.
“I’m going to nominate this White House for a Tony Award for the most drama, not the best drama but the most drama,” said Chicago Mayor Rahm Emanuel, who served as President Barack Obama’s first chief of staff. “I’ve lost track, eight months in, how many people have been fired? How many have left?”
Mr. Trump’s first year has been plagued by departures, including Anthony Scaramucci and Michael Dubke, both of whom served as communications director; Michael T. Flynn, the president’s first national security adviser; Sean Spicer, the press secretary; and Reince Priebus, who was chief of staff before Mr. Kelly.
The sense of chaos continued on Friday as Carl Icahn, a billionaire investor who was advising Mr. Trump on regulatory issues, announced he was stepping down from that role. And A.R. Bernard, a pastor on the president’s Evangelical Advisory Board, quit, citing a “deepening conflict in values between myself and the administration.”
By dismissing Mr. Bannon, the president loses the most visible avatar of the nationalist agenda that propelled him to victory. Contentious and difficult, Mr. Bannon was nonetheless a driving force behind the president’s most high-profile policies: imposing a ban on travelers from several majority-Muslim countries; shrinking the federal bureaucracy; shedding regulations; and rethinking trade policies by aggressively confronting China and other countries.
He was also an opponent of Mr. Cohn, a former official at Goldman Sachs, and Dina Powell, the deputy national security adviser who had also worked on Wall Street. Mr. Cohn is a registered Democrat, and both he and Ms. Powell have been denounced by conservative media outlets as being antithetical to Mr. Trump’s populist message.
Mr. Bannon had become increasingly critical of Mr. Trump, according to a person close to both men, complaining that the president lacked the political skills and discipline to avoid a succession of self-inflicted public relations disasters.
But ultimately, he viewed the president as losing sight of what propelled Mr. Trump to the White House. On one hand, Mr. Bannon told friends that Mr. Trump was a populist savant who had a deeper connection with the alienated white working class than any politician in the last half-century. But Mr. Bannon, a former naval officer, also saw the president as increasingly trapped by the generals he surrounded himself with, and moving toward an interventionist foreign policy.
Mr. Bannon complained bitterly about the president’s provocative and unscripted threats to North Korea and was especially concerned about a wider attempt to reassert American military power in the Western Hemisphere. He told his small circle of like-minded confidants in the West Wing that he feared the president would be talked into an intervention in Venezuela, where President Nicolás Maduro has been cracking down on the opposition amid a deteriorating economic and political situation.
Last week, Mr. Trump suggested that a military option was under consideration in Venezuela. Mr. Bannon told people close to him that the statement indicated the president is relying too heavily on advisers who want him to embark on “military adventures.”
Mr. Bannon frequently clashed with Mr. Kushner and others in the administration who sought a more traditional, globalist approach to the world’s problems. He also had a long-running feud with Lt. Gen. H.R. McMaster, the national security adviser.
There were different interpretations of how Mr. Bannon left his job, which had been long anticipated in Washington.
One White House official, who would not be named discussing the president’s thinking, said Mr. Trump has wanted to remove Mr. Bannon since he ousted Mr. Priebus three weeks ago. Since then, Mr. Kelly has been evaluating Mr. Bannon’s status, according to the official.
But a person close to Mr. Bannon insisted that the parting of ways was his idea, and that he had submitted his resignation to the president on Aug. 7, to be announced at the start of this week, timed to his one-year anniversary of working for Mr. Trump.
According to three people close to the discussions, Mr. Trump and Mr. Bannon agreed during the previous week that he would depart. But the violence in Charlottesville pushed Mr. Bannon closer to Mr. Trump; he encouraged the president to stand by his impulses in his response and, one of the three people said, sought to stay on longer.
That became untenable after the American Prospect interview, in which he mocked colleagues, though he later said he thought was off the record. In it, Mr. Bannon also contradicted Mr. Trump’s tough threats toward North Korea, saying “there’s no military solution here, they got us.” Privately, several White House officials said that Mr. Bannon appeared to be provoking Mr. Trump.