Top presidential adviser and nationalist bomb-thrower Steve Bannon is out of a job, the White House said Friday.

“Chief of Staff John Kelly and Steve Bannon have mutually agreed today would be Steve’s last day. We are grateful for his service and wish him the best,” press secretary Sarah Huckabee Sanders said in a statement.

Kelly had earlier wrapped up a review of the West Wing staff and the former Breitbart editor, the voice of the alt-right who had the president’s ear, was the first casualty.

“Bannon had one hell of a run,” tweeted Matt Drudge, who first reported the story.

Bannon had been on the outs with Trump before for grandstanding and stealing the spotlight, but the president suspected he was one of the main leakers in the administration, trashing his colleagues in news reports.

The notoriously thin-skinned president resented the publicity Bannon had been getting as the supposed mastermind of Trump’s campaign and upset victory.

One White House source told Axios, “His departure may seem turbulent in the media, but inside it will be very smooth. He has no projects or responsibilities to hand off.”

Bannon in recent days gave interviews to publications including the New York Times, in which he defended Trump’s controversial comments in the wake of the racial violence in Charlottesville, Va., last weekend.

A senior White House official told Axios that it seemed like Bannon was setting himself up to be a martyr — the white nationalist hero canned by the “globalists.”

A source close to Bannon added: “This week is a good window into what Bannon outside the [White House] would look like: A strong defense of POTUS and ‘fire and fury’ for enemies of the Trump agenda. Get ready for Bannon the barbarian.”

And Bannon was expected to rejoin Breitbart, which he once said gave a platform to the alt-right.

Trump told reporters at Trump Tower on Tuesday that Bannon was a “good man” and “not a racist.”

“I like Mr. Bannon. He’s a friend of mine. But Mr. Bannon came on very late. You know that. I went through 17 senators, governors, and I won all the primaries. Mr. Bannon came on very much later than that,” Trump said, adding, “but we’ll see what happens with Mr. Bannon.”

In his interview with the ultra-liberal American Prospect, Bannon contradicted the president’s position on North Korea while trashing his more moderate colleagues for their views on an “economic war” with China.

The danger for Trump is that Bannon will unleash Breitbart and other conservative media against the White House.

Bannon had a rocky relationship with some of Trump’s top aides, especially Jared Kushner and National Economic Council director Gary Cohn, and has shown he’s not averse to a scorched-earth policy.

Bannon’s departure could empower more moderate voices in the administration, including Cohn and Secretary of State Rex Tillerson.

Sam Nunberg, a Bannon confidant, said that when he’s back at Breitbart, “Steve will compliment the administration when it’s right. When it’s wrong, he’ll knock their block hard.”

But one Breitbart editor, Joel Pollack, has already posted an ominous warning on his Twitter feed: “#War.”