Image copyright Getty Images

White House chief strategist Steve Bannon is the latest top aide of President Donald Trump to leave his post.

Press Secretary Sarah Huckabee Sanders confirmed that Friday was his last day.

His exit follows a review of his position by White House Chief of Staff John Kelly.

Mr Bannon, who helped shape Mr Trump's "America First" campaign message, is returning as head of Breitbart.com, and says he will remain loyal.

The 63-year-old is executive chairman of the website, which has been accused of voicing anti-Semitic and white supremacist views.

In another departure from Mr Trump's team, billionaire investor Carl Icahn announced he was ending his role as the president's special advisor on regulatory reform, after facing criticism that his advice could benefit his own businesses.

Media playback is unsupported on your device Media caption Some of the people who have resigned or been fired under President Trump

Mr Bannon is known to have competed for influence in the West Wing against more moderate factions, including members of the Trump family.

He told the Bloomberg TV network: "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."

Mr Trump raised eyebrows earlier this year when he elevated Mr Bannon to the National Security Council, the main group advising the president on national security and foreign affairs.

But he was subsequently removed from the council in a move that was seen as a sign of National Security Adviser HR McMaster's growing influence over the president.

Mr Bannon has reportedly feuded with Mr McMaster as well as Gary Cohn, the director of the president's National Economic Council and a former Goldman Sachs chief viewed as a globalist.

Mr Cohn, along with President Trump's son-in-law, Jared Kushner, and daughter, Ivanka Trump, were viewed as threats to Mr Bannon's White House agenda.

Taking credit did him in

By Anthony Zurcher, BBC North America reporter

Steve Bannon may be out as a senior White House adviser, but Bannonism - if that's what it can properly be called - is still firmly entrenched in the White House.

Donald Trump has repeatedly boasted that the success of his presidential campaign should properly be attributed to him, not Mr Bannon. And, in the end, Mr Bannon's desire to take credit for that win may have been what did him in.

It certainly wasn't because of any sharp ideological divides between the president and the former head of Breitbart News.

Border security, aggressive trade protectionism, immigration reform and a certain kind of cultural nostalgia - all were themes that Mr Trump ran on from the start, which Mr Bannon only sharpened and focused. They're also issues Mr Trump has pushed in recent weeks, even as Mr Bannon has been increasingly marginalised.

Mr Bannon's firing will be seen as a win for Chief of Staff John Kelly, whose attempts to instil discipline in the White House will get a boost without the free-wheeling Mr Bannon roaming the hallways.

Trump was Trump before Mr Bannon came on the scene, however. And as the rollercoaster ride that was politics this week indicates, the president isn't changing anytime soon.

Mr Trump fuelled speculation when asked last week about Mr Bannon's future as he replied: "We'll see."

Mr Bannon's interview this week with the American Prospect, a liberal magazine, reportedly infuriated the president.

The White House aide was quoted as dismissing the idea of a military solution in North Korea, undercutting Mr Trump.

He told the magazine the US was "at economic war with China" and that he aimed to push out moderates whom he believed were soft on China.

Mr Bannon told associates he thought it was an off-the-record chat and did not realise he would be quoted.

He has pushed for imposing additional tariffs on China and other trade partners to reduce deficits with those countries.

He also advocated for a travel ban on citizens of certain Muslim-majority countries.

Ms Huckabee Sanders' statement said: "White House 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."

Source familiar with the decision said Mr Bannon had been given the chance to leave on his own terms.

Who else left Trump's White House team?

Anthony Scaramucci, communications director - 31 July

Reince Priebus, chief of staff - 28 July

Sean Spicer, press secretary - 21 July

Mike Dubke, communications director, 30 May

Michael Flynn, national security adviser - 14 February

This photo sums up White House turmoil

Mr Bannon took over as chief of Trump's presidential campaign in August 2016.

He was formerly a US Navy officer, Goldman Sachs investment banker, Hollywood movie producer and head of Breitbart News.

The right-wing outlet that has boisterously supported Mr Trump announced his return within hours.

Breitbart's senior editor-at-large Joel Pollak tweeted: "#WAR" before Bannon made it clear he was staying on the president's side.