Spicer said that he resigned to give the president a "clean slate" moving forward. In a message on Twitter, he added that he will serve in his post until the end of August.
Asked if he had any regrets, Spicer answered: "None."
Trump officially offered the position to Scaramucci, whom he has become closer to in recent weeks, at a meeting with senior staff in the Oval Office on Friday morning. And Thursday, Trump, Vice President Pence, Scaramucci and Trump's daughter, Ivanka, also huddled privately in the Oval Office to discuss Scaramucci's new role.
On Friday morning, the West Wing scrambled to present a united public front. Priebus called a private meeting of the White House communications staff, and made clear that Spicer, who is expected to help Scaramucci transition into the role, is leaving to give the new communications director "a clean slate," according to someone briefed on the meeting.
Priebus also tried to play down any tensions with Scaramucci, saying the two have known each other for a long time, and Scaramucci told his new team that he is not a "top down" manager, this person said.
Scaramucci and Spicer also hugged.
But bringing Scaramucci into the White House is likely to increase the backbiting and tension among Trump's senior staff, especially with Priebus, with whom he has clashed in the past. The communications post has remained open since it was vacated by Michael Dubke in May.
Bringing Scaramucci into the fold represents the most significant shake-up yet for a communications shop that has struggled to amplify the president's message on the administration's core economic and national security priorities.
Scaramucci, a Trump campaign loyalist backed by Trump's children, was slated to join the White House in another capacity early on, but he had challenges resolving ethical conflicts associated with his fund, SkyBridge Capital, which he sold to a Chinese conglomerate with ties to the government just before Trump's inauguration. Trump has also been impressed by Scaramucci's frequent appearances as a defender on cable news.
At the same time, Trump's legal team is also in flux. Trump's longtime personal attorney, Marc Kasowitz, will step back from his central role in the president's outside legal team with John Dowd, a seasoned Washington attorney with a focus on white-collar crime, now taking the lead in managing the president's defense. Mark Corallo, a longtime GOP operative who had served as a spokesman for Trump's legal team, resigned Thursday.
The president has become agitated by the possibility that special counsel Robert Mueller might begin looking into Trump and his family's personal finances. In an interview this week with The New York Times, the president issued a warning to Mueller that such a move would be a "violation."
"Let's go back to what the purpose of the investigation was: Russian interference in our election," said White House counselor Kellyanne Conway, speaking on Fox News Friday morning. She added, "Where is this going and are Americans comfortable with that - with the taxpayers funding this, with this going off all types of chutes and ladders?"
Trump's legal team has begun working to undermine the special counsel probe, including investigating ways to highlight conflicts of interest on Mueller, The Washington Post reported on Thursday. The president has also inquired about his pardon authority.
After the story was published, one of Trump's attorneys, Dowd, said it was "not true" and "nonsense."
One Trump adviser said the president has simply expressed a curiosity in understanding the reach of his pardoning authority, as well as the limits of Mueller's investigation.
"This is not in the context of, 'I can't wait to pardon myself,' " a close adviser said.
The idea that Trump would proactively pardon people involved in the Russia investigation was immediately criticized by the ranking Democrat on the Senate Intelligence Committee, which is also investigating Russian meddling in the election and possible Trump campaign collusion.
"The possibility that the President is considering pardons at this early stage in these ongoing investigations is extremely disturbing," Sen. Mark Warner, D-Va., said in a statement. "Pardoning any individuals who may have been involved would be crossing a fundamental line."
The White House has struggled to remain focused on its agenda, amid the constant drumbeat of the Russia investigation. The president himself has only fueled the Russia frenzy, giving an interview on Wednesday in which he talked extensively about the probe.
Last week, the White House announced that another attorney, Ty Cobb, would join the White House to help manage the response to the investigation internally.
On Friday morning, when asked if Scaramucci would join the White House, Conway praised him but did not confirm that the decision was settled.
"All I can say is in speaking with the president and others that, you know, we have a great communications team already," Conway said. "Anthony Scaramucci is somebody who has been an incredible asset to President Trump all during the campaign, the transition, and now he is one of the killers on TV who goes out there, thinks the president is being treated very unfairly, and we don't get any of the economic news out there, even though our press and communications shop tries."
"The president has confidence in all of the people who work for him, and we know that Anthony is someone who is a friend to the administration," she added.
- Ben Terris and Rosalind Helderman contributed to this report.