The White House communications operation underwent a dramatic shake-up Friday. Sean Spicer resigned as press secretary after President Trump appointed Anthony Scaramucci, a wealthy New York financier, as his communications director. Appearing on camera before the White House press corps at a televised press briefing, Scaramucci then announced Sarah Sanders, Spicer's deputy, as the new press secretary.

In statements Friday night, Trump praised Scaramucci and Sanders.

"Anthony is a person I have great respect for, and he will be an important addition to this Administration," Trump said. "He has been a great supporter and will now help implement key aspects of our agenda while leading the communications team." The White House also said that "Scaramucci will oversee the entire communications operation, including message development and strategy," and that he will report directly to Trump when he begins his new position on August 15.

And Trump said that, while deputy press secretary, Sanders has "done an outstanding job" and that, as press secretary, "she will continue to promote the progress we are making toward the things the people truly care about, like growing our economy, bringing jobs back from overseas, slashing government bureaucracy, and keeping America secure."

The personnel changes come six months after Trump took office and at a time when his agenda is stalled and a special counsel is widening the investigation into possible ties between Trump campaign officials and Russia.

At the briefing, Scaramucci addressed the White House's often-tense relationship with journalists, saying that the president has been doing an "amazing job" but that there has been "a disconnect between the way we see the president and how much we love the president and the way perhaps some of you see the president." He added, "We want to get that message out there."

He dismissed reports of tensions between himself and White House chief of staff Reince Priebus, saying he and Priebus were "a little bit like brothers, where we rough each other up once in awhile," but that they are committed "as true professionals to the team, and the process of getting the administration's message out."

He also disputed a reporter's question that he was brought into the White House to "right the ship." "The ship is going in the right direction," Scaramucci said. "I think we've got to just radio signal the direction very, very clearly."

Scaramucci, 53, has a law degree from Harvard Law School and worked at Goldman Sachs before forming his own investment firm, SkyBridge Capital. He hosted Wall Street Week and appeared on Fox Business Network, where in 2015, he criticized then-candidate Trump as a "political hack." He said Friday that the president reminds him of that remark every "15 seconds" and that he has apologized to the president.

Sanders read a statement from Trump during Friday's briefing, saying that he was grateful for Spicer's work and that he wished "him continued success, as he moves on to pursue other opportunities," adding "just look at his great television ratings." And in a tweet hours later Friday night, Trump had more praise for Spicer.

Prior to joining the Trump administration, Spicer had been communications director for the Republican National Committee after stints as spokesman for House Republicans and for George W. Bush's trade representative.

As Trump's spokesman, Spicer had an embattled tenure at the White House. His briefings with reporters were contentious from the president's first days in office, when Spicer falsely said the size of the crowds at Trump's inauguration were larger than President Barack Obama's.

He was mocked on NBC's Saturday Night Live in a caricature played by Melissa McCarthy. As Spicer, she confessed the press secretary and the press corps had gotten off to a rocky start: "When I say rocky start, I mean in the sense of Rocky, the movie. Because I came out to punch you in the face. And also, I don't talk so good."

Spicer faced a difficult task at the White House, called on to defend and explain Trump's tweetstorms, while under the constant gaze of his boss, who at one point was said to have been unhappy with Spicer's wardrobe.

A devout Catholic, Spicer was kept out of Trump's audience with Pope Francis during a recent overseas trip.

In recent days, many of the White House briefings have been conducted by Sanders and off-camera. In a tweet Friday night, Spicer had kudos for Sanders.

And Sanders returned the praise in a statement released by the White House Friday evening. "I have great appreciation and respect for Sean Spicer, who has been more than a colleague, but a true friend and mentor," she said.