Assuming it lasts — and with Mr. Trump, nothing is ever certain — the schism could test whether he or Mr. Bannon has more resonance with the conservative base that has sustained the president through a tumultuous tenure marked by low poll numbers. Mr. Bannon’s Breitbart News has been a key weapon in Mr. Trump’s hostile takeover of the Republican Party.

Cheering the breakup on Wednesday were establishment Republicans who resent Mr. Bannon’s bomb-throwing style and his vows to wage war on incumbent lawmakers in the party primaries this year. Senate Republicans could barely contain their glee as they redistributed Mr. Trump’s statement blasting Mr. Bannon with the note “in case you missed it” and a smiling face symbol. By afternoon, candidates whom Mr. Bannon has endorsed in a handful of races faced pressure to disavow his remarks about the president’s son.

At the White House on Wednesday morning, aides who had kept a watchful eye on Mr. Bannon’s efforts to make himself a kingmaker saw an opening to finally rid themselves of him. They encouraged the president to hit back publicly, and Mr. Trump went through at least three drafts of a statement with his communications director, Hope Hicks, and other aides before sending out a final version unlike any issued by a president against a top adviser in modern times.

“Steve pretends to be at war with the media, which he calls the opposition party, yet he spent his time at the White House leaking false information to the media to make himself seem far more important than he was,” Mr. Trump said in the statement. “It is the only thing he does well. Steve was rarely in a one-on-one meeting with me and only pretends to have had influence to fool a few people with no access and no clue, whom he helped write phony books.”

A private lawyer representing Mr. Trump sent Mr. Bannon a letter on Wednesday directing him to cease and desist making derogatory comments about the president and his family and threatening a defamation lawsuit. “Legal action is imminent,” said the letter, first reported by ABC News and confirmed by a person close to the president.