WASHINGTON — Stephen Bannon left his post as chief White House strategist Friday to return to the right-wing online Breitbart News, where he said he’ll be “going to war” from the outside for President Donald Trump.“If there’s any confusion out there, let me clear it up: I’m leaving the White House and going to war for Trump against his opponents — on Capitol Hill, in the media, and in corporate America,” Bannon said Friday in an interview with Bloomberg News hours after his departure was announced.

Bannon, an economic nationalist and populist who helped Trump win the election but skirmished with other White House advisers he criticized as “moderates,” exited with a vow to fight for his ideology.

“The Trump presidency that we fought for, and won, is over,” Bannon told the conservative Weekly Standard. “We still have a huge movement, and we will make something of this Trump presidency.”

He said Trump will find it harder to accomplish his larger goals because “there’s about to be a jailbreak of these moderate guys on the Hill” and aides will try to “moderate him.”

Bannon is the fifth senior official to depart from the White House in the past five weeks, exiting as Trump’s new chief of staff John Kelly revamps the system in an effort to end the turmoil at the upper levels of the administration.

Bannon has been a polarizing figure within the White House, pushing Trump to a more extreme position on trade and foreign policy, allegedly leaking dirt about his White House rivals, and warring with what he called the “Republican establishment.”

Bannon also clashed with other advisers, including Jared Kushner, Trump’s son-in-law, and Cabinet members from Wall Street.

advertisement | advertise on newsday

His departure was cheered on the floor of the New York Stock Exchange and came after many top corporate CEOs quit Trump advisory panels because Trump’s remarks equivocated on denouncing white supremacists and blamed “both sides” for the racial violence in Virginia last Saturday.

Bannon said he had tendered his resignation on Aug. 7 effective a week later because “I’d always planned on spending one year.” But the tumult in Virginia delayed it, he said.

Bannon rejoined Breitbart News as executive chairman Friday afternoon and chaired the company’s evening editorial meeting, the online news outlet said.

“The populist-nationalist movement got a lot stronger today,” said Breitbart News editor-in-chief Alex Marlow.

White House press secretary Sarah Huckabee Sanders said on Friday, “White House Chief of Staff John Kelly and Steve Bannon have mutually agreed today would be Steve’s last day.”

Kelly has been reviewing the White House staff and may target other advisers for dismissal, according to news reports.

Following the street fights in Charlottesville between participants in a “pro-white rally” bearing Nazi and fascist symbols and counterprotesters, critics called for the ouster of Bannon and other “nationalists” in the White House.

At Trump Tower on Tuesday, Trump fended off questions raised by Sen. John McCain (R-Ariz.) about Bannon’s “alt-right” allies attacking National Security Director H.R. McMaster.

Asked about Bannon and his future, Trump said “he’s not a racist” and he’s a “friend of mine.” But Trump added, “We’ll see what happens with Mr. Bannon.”

The next day, Bannon contradicted administration policy on North Korea and its nuclear weapons — saying “there’s no military solution” despite Trump’s warning of “fire and fury” — in a phone call to a writer at The American Prospect, a liberal magazine. Bannon said he thought he was off the record.

advertisement | advertise on newsday

Bannon called white nationalists “a collection of clowns” but also urged Democrats to talk about “racism every day” so Republicans could “crush them” in elections.

Rep. Peter King (R-Seaford) said the interview led him to urge Trump Thursday to fire Bannon for “undermining the president on foreign policy and encouraging in effect a political race war.”

Bannon had led Breitbart News since 2012 until he was brought into the Trump general election campaign — and the White House — by Robert Mercer, the billionaire co-president of the Renaissance Technologies hedge fund in East Setauket.

Now Bannon is back at Breitbart News.

“I feel jacked up,” he told the Weekly Standard. “And know I’m about to go back, knowing what I know, and we’re about to rev that machine up.”