WASHINGTON -- White House press secretary Sean Spicer abruptly resigned Friday over U.S. President Donald Trump's decision to tap a camera-ready financier to lead the beleaguered White House communications team. The departing spokesman said the president "could benefit from a clean slate" as he seeks to steady operations amid the Russia investigations and ahead of a health care showdown.

Spicer, whose daily briefings once dominated cable television and delighted late-night comics, quit in protest over the hiring of Anthony Scaramucci as the new White House communications director. Spicer denounced what he considered Scaramucci's lack of qualifications, according to people familiar with the situation.

As his first act on the job, Scaramucci, a polished television commentator and Harvard Law graduate, announced from the White House briefing room that Sarah Huckabee Sanders would take Spicer's job. She had been Spicer's deputy.

The shake-up among the president spokespeople comes as Trump is suffering from dismal approval ratings and struggling to advance his legislative proposals. As his effort to replace Barack Obama's health care law crumbled this week, the president continued to vent frustration about the attention devoted to investigations of allegations of his election campaign's connections to Russia. Trump has blamed his own messengers -- as well as the "fake news" media -- for his woes.

Trump, who watches the press briefings closely and believes he is his own best spokesman, saluted Spicer's "great ratings" on TV and said he was "grateful for Sean's work on behalf of my administration and the American people." That was in a statement read out by Sanders.

Scaramucci, who said Spicer had been gracious in showing him around on Friday, quickly took centre stage, parrying questions from reporters and praising Trump in a 37-minute charm offensive. He flashed the television skills that Trump has long valued: He commended Trump's political instincts and competitiveness, cracked a few self-deprecating jokes and battled with reporters who categorized the West Wing as dysfunctional, saying "there is a disconnect" between the media and the way the public sees the president.

"The president has really good karma and the world turns back to him," Scaramucci said.

Spicer said during a brief phone conversation with The Associated Press that he felt it would be best for Scaramucci to build his own operation "and chart a new way forward." He tweeted that it had been an "honour" and "privilege" to serve Trump and that he would remain in his post through August.

His decision to quit took advisers inside and outside the White House by surprise, according to people with knowledge of the decision. They spoke on condition of anonymity because they were not authorized to discuss the personnel matter publicly.

Spicer's daily press briefings had become must-see TV until recent weeks when he took a more behind-the-scenes role. Sanders has largely taken over the briefings, turning them into off-camera events.

The White House had been looking for a new communications director for several weeks, but struggled to attract an experienced Republican hand. Scaramucci, a former Democrat -- like Trump -- who once called his new boss a "hack politician," began seriously talking to the White House about the position this week, and the president offered him the job Friday morning.

A person with knowledge of the decision said Trump has been impressed by Scaramucci's defence of the White House on television and by his handling of a recent incident with CNN. The cable channel retracted a story about Scaramucci and fired three journalists.

A shift in briefing-room tone and style was immediate. Scaramucci's delivery was smooth and polished. Spicer, who displayed a sometimes-fiery and occasionally flustered demeanour in on-camera exchanges with reporters, became widely known, particularly through an impersonation by Melissa McCarthy on NBC's "Saturday Night Live." McCarthy's signature move was to plow down reporters with the podium when exasperated by questioning.

Spicer had long sought the strategic communications job for himself and had been managing that role along with his press secretary duties for nearly two months.

He had spent several years leading communications at the Republican National Committee before helping Trump's campaign in the general election. He is close to White House chief of staff Reince Priebus, the former RNC chair.

Priebus told The Associated Press he supports Scaramucci "100 per cent," despite reportedly trying to prevent the financier from getting multiple administration positions. Ivanka Trump, the president's daughter, and her husband, powerful senior aide Jared Kushner, had known Scaramucci for years from New York and pushed for his hire.

Scaramucci, a frequent visitor to Trump Tower during the transition, is expected to play a visible role as one of Trump's defenders on television. But Spicer and other officials questioned his hiring as communications director ahead of the president's push to overhaul the tax system and other policy issues.

As a Wall Street titan-turned-TV talking head, Scaramucci has no government experience and no experience crafting communication strategy around policy.

It's unclear whether the new leadership will lead to a more open White House.

Scaramucci did not commit to putting briefings back on camera full-time. He also offered a level of support for some of Trump's more outlandish statements, including his unsupported claim that millions of illegal votes were cast in the 2016 election.

"If the president says it ... there's probably some level of truth to that," he said.

He also made clear that he would continue Trump's efforts to push back against media reports he doesn't like -- and would do a better job of selling his victories.

"The president is a winner. And we're going to do a lot of winning," said Scaramucci, who blew a kiss to the press corps before departing.

Scaramucci notably said he reports directly to the president, not to the chief of staff -- a highly unusual arrangement for a communications director and a possible reflection that Priebus' standing with Trump is often uncertain.

Back in January, Spicer's tenure got off to a rocky start. On Trump's first full day in office, he lambasted journalists over coverage of the crowd size at the inauguration and stormed out of the briefing room without answering questions.

Spicer remained loyal to Trump but frequently battled perceptions that he was not plugged in to what the president was thinking.

The resignation comes a day after Mark Corallo, the spokesman for the president's outside legal team, left his post. And in a separate move, former White House aide Katie Walsh is returning to the RNC, spokesman Ryan Mahoney said. Walsh will serve as an adviser on data and digital issues, and the appointment is unrelated to the White House personnel changes, he said.

The latest on changes to the White House communications staff (all times local):

9:50 p.m.

U.S. President Donald Trump says Sean Spicer is a "wonderful person who took tremendous abuse from the Fake News Media."

Trump also says in a late Friday tweet that Spicer's future is "bright."

Spicer resigned earlier in the day, six months into the administration, after Trump tapped New York businessman and political supporter Anthony Scaramucci for the job of White House communications director. Spicer had been filling that role temporarily and wanted the job for himself.

Spicer had a combative tenure as Trump's chief spokesman, often clashing with reporters at his daily news briefings.

Trump himself regularly denounces the mainstream media as the "Fake News Media."

3:30 p.m.

Newly named White House communications director Anthony Scaramucci went right to work answering journalists' questions after getting the job.

Scaramucci entered the White House press briefing room with Sarah Huckabee Sanders, who now has the position of press secretary for U.S. President Donald Trump.

The New York financier repeatedly declared his love for and loyalty to Trump.

Scaramucci also pushed back against the notion that the White House remains adrift six months into Trump's term.

Scaramucci says Trump is doing a phenomenal job and that he'll work with the rest of the White House communications team to get that message "out there a little more aggressively."

He answered a range of questions and blew a kiss and waved to journalists before leaving the briefing room.

------

2:45 p.m.

New York financier Anthony Scaramucci has been formally named White House communications director and Sarah Huckabee Sanders has been promoted to press secretary in the Trump White House's latest shakeup.

Trump says in a statement read by Sanders that he's "grateful" for departing press secretary Sean Spicer's "work on behalf of my administration and the American people."

He adds: "just look at his great television ratings!"

Scaramucci also is addressing reporters at the White House. He calls Spicer "a true American patriot" and says he hopes Spicer "goes on to make a tremendous amount of money."

------

2 p.m.

Outgoing press Secretary Sean Spicer says that he chose to resign from his position to give incoming communications director Anthony Scaramucci a fresh start.

Spicer says during a brief phone conversation with The Associated Press following his announced departure that, "we're at the point where" the president "could benefit from a clean slate."

He says he felt it would be best for Scaramucci to be able to build his own operation "and chart a new way forward."

Spicer is also complimenting Scaramucci, a New York financier and frequent defender of the president who was a staple at Trump Tower during the president's transition.

Spicer says of Scaramucci's hiring: "It'll be great, he's a tough guy."

------

1:50 p.m.

White House press secretary Sean Spicer says it's been "an honour" and "privilege" to serve U.S. President Donald Trump and the country.

Spicer resigned Friday in protest over the hiring of a new White House communications director.

He says in a tweet that he will continue his service through August.

One person with knowledge of the situation said Spicer objected to the hiring of New York financier Anthony Scaramucci's lack of qualifications for the communications role. The person spoke on condition of anonymity because they were not authorized to discuss the personnel matter publicly.

------

1 p.m.

White House deputy press secretary Sarah Huckabee Sanders will be conducting an on-camera briefing on Friday afternoon, following White House press secretary Sean Spicer's resignation.

Spicer announced his departure after U.S. President Donald Trump hired a new White House communications director, ending his rocky six-month tenure as Trump's top spokesman.

Sanders has been handling most of the briefing duties in recent weeks, and most briefings have been off-camera. The last on-camera White House briefing was held on June 29.

------

12:35 p.m.

White House chief of staff Reince Priebus says he supports incoming communications director Anthony Scaramucci "100 per cent."

His comments come moments after White House press secretary Sean Spicer resigned over Scaramucci's hiring.

Priebus and Spicer spent years working closely together at the Republican National Committee. Priebus has also reportedly opposed hiring Scaramucci for various administration positions.

Priebus told The Associated Press that he and Scaramucci are "very good friends." He says it's "all good here" at the White House.

------

12:07 p.m.

White House press secretary Sean Spicer is resigning his position, according to two people with knowledge of the decision.

One of those people said Spicer is quitting because of objections over the appointment of a new White House communications director, New York financier Anthony Scaramucci.

The people with knowledge of the decision insisted on anonymity because they were not authorized to discuss the personnel matter publicly.

------

Associated Press writers Jonathan Lemire, Darlene Superville, Vivian Salama and Jill Colvin in Washington and David Bauder in New York contributed to this report.