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

WASHINGTON — Steve Bannon, the embattled White House chief strategist, is leaving President Donald Trump’s administration, the White House announced Friday.

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

Bannon's departure caps a rocky tenure in the West Wing in which he was a central figure in a power struggle to influence the often unpredictable president. He clashed with many of Trump’s other top aides including the president’s son-in-law, Jared Kushner, and National Security Adviser, H.R. McMaster, and rumors of his waning influence and imminent departure had been circulating Washington for months.

Bannon’s departure comes at a particularly tumultuous time — even for a White House seemingly always engulfed by drama.

He leaves just three weeks after chief of staff Reince Priebus resigned and 18 days after Anthony Scaramucci’s short-lived tenure as communications director came to a close.

He will walk away from the White House as a key force behind Trump's impulses to make racially divisive remarks and fan nationalist and ethnic tensions, most recently Trump’s comments on the violence in Charlottesville, Virginia. As recently as this week, Bannon gave interviews seeming to embrace the racial turmoil Trump encouraged by comparing white nationalists and the protesters opposing them in Charlottesville.

But Bannon will have no shortage of opportunities to continue making news.

Just hours after his exit became official, the newsroom where he first rose to prominence in far-right political circles, Breitbart News, announced he'd be returning as its executive chairman.

Bannon had worked in the same role before Trump tapped him in August 2016 to run his presidential campaign, and then as his chief strategist after he won the election.

In an interview with the Weekly Standard published soon after the Breitbart announcement, Bannon referred to his site as one of his "weapons" and vowed to "crush the opposition."

But he also appeared to express feelings of resignation, telling the magazine that "the Trump presidency that we fought for, and won, is over."

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

"We will make something of this Trump presidency. But that presidency is over. It’ll be something else," he said.

Bannon’s future in the West Wing was far from certain after Kelly's appointment as chief of staff. The retired Marine general's elevation from Secretary of Homeland Security to running the West Wing was taken as a signal to many that the president hoped to end the palace intrigue surrounding his administration.

Related: 'He Should Go': Calls for Bannon's Ouster Came From Right and Left

In his interview with the Weekly Standard, Bannon said he'd offered his resignation to Kelly voluntarily on August 7, with the plan for it to become effective a week later.

“I’d always planned on spending one year. General Kelly has brought in a great new system, but I said it would be best. I want to get back to Breitbart," Bannon said.

The effective date was delayed after fallout following Charlottesville.

Longtime Trump aide Roger Stone, Scaramucci, and Reps. Peter King and Ileana Ros-Lehtinen are among the high-profile Republicans who had called for Bannon's ouster in recent weeks. A number of organizations and Democratic lawmakers, such as the NAACP and House Democratic Leader Nancy Pelosi, also recently called for Bannon’s resignation.

But it was Trump’s own words that made it most clear that his one-time confidant’s time was running out. The president did not endorse Bannon when asked about his future earlier this week, saying “we’ll see what happens” with him.

The president made his displeasure clear as early as April, hitting back at Bannon in a pair of interviews.

“You have to remember he was not involved in my campaign until very late," Trump told the New York Post in April, downplaying Bannon's role as chief architect of his campaign victory. "I had already beaten all the senators and all the governors, and I didn’t know Steve. I’m my own strategist and it wasn’t like I was going to change strategies because I was facing crooked Hillary."

Trump also slammed Bannon, the former head of Breitbart News, in an interview with The Wall Street Journal in which he described Bannon as “a guy who works for me.”

Bannon, too, became frustrated in his role in the administration after being removed from the National Security Council in April.

By July, several White House advisers told Politico that Bannon had put himself in a “self-imposed exile” to enhance his prospects for West Wing longevity.

Bannon joined Trump late into his 2016 run, but is largely credited with helping to steer Trump’s upset victory. His appointment in both the campaign and later to a senior role in the White House was controversial. Breitbart has been a home for the nationalist wing of the Republican party, and it gave a voice to writers who were accused of racial inflammation.

As Trump’s campaign chief — he took over for Paul Manafort in August 2016 — Bannon helped the then-candidate capitalize on a wave of enthusiasm centered on economic nationalism and cemented the Republican presidential nominee's appeal among ultraconservatives and hone his nationalist message.

From inside the White House, Bannon used the first weeks of the Trump presidency to help the president keep several campaign promises related to immigration and the suspension of travel for people from Muslim-majority countries, although many initiatives were struck down or delayed by federal courts.

Some very conservative members of Congress, like Rep. Steve King, R-Iowa, supported Bannon's role in the administration. In an interview with NBC News, King called the chief strategist's forced departure part of a "purge" of conservatives in the West Wing and a "hard blow landed against conservatives."

“I don’t have any longer the expectations that Trump even can keep the rest of his promises," King said.

“He needed more conservatives in the West Wing, not less," he added.

King, an immigration hardliner, says Bannon's firing appears to be a result of Kelly coming in as chief of staff, and that he was especially concerned about the potential impact on Trump's promises surrounding immigration.

“We know that Gen. Kelly is not committed to president's very, very public campaign promise of eliminating DACA," King said.

Pelosi hailed Bannon's departure, but cautioned that the White House is still problem-plagued.

"Steve Bannon's firing is welcome news, but it doesn’t disguise where President Trump himself stands on white supremacists and the bigoted beliefs they advance," Pelosi said in a statement. "President Trump's growing record of repulsive statements is matched by his repulsive policies. Personnel changes are worthless so long as President Trump continues to advance policies that disgrace our cherished American values."

Kristen Welker reported from Bridgewater, N.J., Andrew Rafferty from Washington, and Adam Edelman from New York.