Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Steve Bannon is leaving his post at Breitbart News under pressure after making derogatory comments about the president and his family in a new book.

Bannon "had to either give up being involved in politics or Breitbart," a source close to him told NBC News. "He chose (to stay involved in) politics. Him being involved in politics was interfering with Breitbart's ability to act as a news organization."

"I'm proud of what the Breitbart team has accomplished in so short a period of time in building a world-class news platform," Bannon, who had served as executive chairman, said Tuesday in a statement.

Sirius XM, which carried a Breitbart-branded Bannon talk show that he hosted, also booted him, explaining that its relationship is with the media organization, not him.

The departures capped a wild week in which the once-mighty Bannon — the top executive on Trump's 2016 campaign and later the chief White House strategist — saw the president, old allies and his financial backers turn on him.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Bannon had been shown the exit from the White House in August, but remained influential with Trump until excerpts from Michael Wolff's new book, "Fire and Fury: Inside Donald Trump's White House," were published last week.

When he left the White House, Bannon sent signals that he was pleased to wreak havoc on the Republican political establishment from the outside, mainly from Breitbart — which he termed a "platform for the alt-right" in a 2016 interview with Mother Jones magazine.

But his aggressive tactics and loose lips — in "Fire and Fury" he is quoted calling a meeting that Trump campaign hands Donald Trump Jr., Paul Manafort and Jared Kushner had with Russian emissaries "treasonous” and “unpatriotic" — ultimately proved his undoing.

After those comments were published, the president issued a scathing statement saying he wanted nothing more to do with Bannon and that his former adviser had "lost his mind."

Bannon already had alienated much of the establishment wing of the Republican Party with his "nationalist populist" brand of politics, recruitment and support of candidates challenging sitting GOP senators, and open warfare against Senate Majority Leader Mitch McConnell, R-Ky.

His high-water mark as a leader of the anti-establishment forces in the GOP civil war came in a series of political victories last year: His candidate, Roy Moore, beat Sen. Luther Strange in an Alabama primary run-off, and Sens. Bob Corker, R-Tenn., and Jeff Flake, R-Ariz., two of Bannon's favorite targets, announced they would not run for re-election in 2018.

But Bannon's judgment was called into question after he pressured Trump to stick with Moore — despite allegations of sexual misconduct against Moore — only to watch Democrat Doug Jones defeat Moore in a stunning upset in December.

The Wolff book was the final straw for the president — and for Bannon.

When Trump cast Bannon out, he forced their shared political base to choose between the two, and that was a battle that Bannon couldn't win. Bannon tried to steady himself by praising Trump on his radio show.

When that didn't work, he issued a statement Sunday backtracking on some of his criticisms of the Trump family and affirming his support for the president.

"I remain ready to stand in the breech for this president's efforts to make America great again," he said.

But Bannon, who is famously stubborn, declined to apologize.