Steve Bannon, a senior adviser to the president who was largely credited with shaping the strategy that got Donald Trump to the White House, is out from his role as the president’s chief strategist. Sarah Huckabee Sanders, the White House press secretary, said Bannon and Chief of Staff John Kelly agreed Friday would be his last day.

“We are grateful for his service and wish him the best,” Sanders said in a statement.

The details of Bannon’s departure remain unclear. The New York Times reported Trump had decided to remove Bannon, but also that a source close to Bannon said the adviser had submitted his resignation on Aug. 7 to be effective Aug. 14. MSNBC’s Stephanie Ruhle also tweeted Bannon is “out.”

CNN’s Jim Acosta and Axios’ Jonathan Swan both tweeted Bannon had been fired.

Bannon was supposed to be fired two weeks ago I'm told. But was given the option to resign. Make no mistake Bannon was forced out. — Jim Acosta (@Acosta) August 18, 2017

He was fired. They came to a face-saving agreement. https://t.co/HhII1486n6 — Jonathan Swan (@jonathanvswan) August 18, 2017

Vanity Fair’s Gabriel Sherman tweeted that Bannon was expected to return to Breitbart News, the site espousing white nationalist views that he led before joining Trump’s president campaign.

Charlie Spiering, Breitbart’s White House correspondent, said Bannon had returned immediately and chaired an editorial meeting on Friday.

🚨Siren🚨 Steve Bannon returned to Breitbart News as Executive Chairman of Breitbart News and chaired our evening editorial meeting — Charlie Spiering (@charliespiering) August 18, 2017

Bannon told Bloomberg Businessweek that he is going to fight for Trump “against his opponents ― on Capitol Hill, in the media, and in corporate America.”

“If there’s any confusion out there, let me clear it up: I’m leaving the White House and going to war,” he told the outlet.

A source close to Bannon told The Atlantic’s Rosie Gray that Bannon is now “fully unchained.”

Bannon’s departure comes amid a recent wave of White House staffing shakeups and turmoil. According to Axios, Trump believed that Bannon was behind recent leaks to the press. The president has made stopping leaks a top priority.

Ji-Sub Jeong/HuffPost

Backlash over Trump’s response to white supremacist violence in Charlottesville, Virginia, may have also led to the departure. Former White House communications director Anthony Scaramucci on Sunday blamed Trump’s failure to directly call out far-right groups on Bannon.

In a statement, the Democratic National Committee said Bannon’s departure would mean “there is one less white supremacist in the White House, but that doesn’t change the man sitting behind the Resolute desk.”

“Donald Trump has spent decades fueling hate in communities, including his recent attempts to divide our country and give a voice to white supremacists,” the group said in a statement.

Bannon, who left Breitbart to run Trump’s campaign in August 2016, pushed Trump to be loyal to the populist base that got him elected. He was a conservative force in the West Wing who helped draft Trump’s controversial ban on travel and immigration from several Muslim-majority countries.

Bannon was once considered one of the most influential members of Trump’s inner circle, but he has receded from public view in recent months. After his feud with Jared Kushner, Trump’s son-in-law, became public earlier this year, Trump urged the two to work it out. Politico also reported Trump was upset over a new book highlighting the importance of Bannon’s role in Trump’s presidential campaign.

Bannon also gave a bizarre interview this week to The American Prospect, a progressive publication, calling white supremacists a “collection of clowns” and contradicted Trump’s military threats to North Korea.

In April, when Bannon and Kushner feuded, Trump downplayed Bannon’s role during his presidential campaign, portraying him as someone who took over in the homestretch and whom he didn’t know well.

Cheriss May/NurPhoto via Getty Images Steve Bannon is out as President Donald Trump's chief strategist.

Bannon once pledged to fight for the “deconstruction of the administrative state.” He long assailed establishment Republicans and reportedly called House Speaker Paul Ryan (R-Wis.) a “limp-dick motherfucker” when there was talk of pushing Ryan to challenge Trump’s claim to the Republican nomination.

Progressives long protested Bannon’s elevation to his role as Trump’s chief strategist, citing his offensive views. Following Trump’s apparent refusal to denounce the white nationalist protesters in Charlottesville, they renewed their calls to “fire Bannon.”

Leaders of the congressional black, Asian, Hispanic and progressive caucuses also had sent a letter to the White House demanding the dismissal of Bannon along with aides Stephen Miller and Sebastian Gorka, saying their presence in the White House emboldened white supremacists across the country. The letter came after Trump faced criticism for initially condemning “all sides” after the violent protests in Charlottesville.

“Americans deserve to know that white nationalists, white supremacists, and neo-Nazis are not in a position to influence U.S. policy,” the letter said. “That is why we continue to find Steve Bannon’s presence in your administration incredibly alarming and dangerous to our nation and the world, and once again, we urge you to immediately remove Steve Bannon from the White House altogether. As you know, Mr. Bannon is the co-founder of the white nationalist, ‘alt-right’ website, Breitbart News. Under his direction and approval, this site published blatantly bigoted rhetoric about women, Muslims, and other minorities. It is no wonder that white nationalist groups, such as the KKK, have praised Mr. Bannon’s extreme political statements.”

This article has been updated with more details about Bannon’s departure from the White House and return to Breitbart.