Editor's note: This story has been updated with the news of Sarah Huckabee Sanders' promotion to press secretary.

After President Donald Trump appointed a new White House communications director Friday morning, Sean Spicer resigned as press secretary.

Spicer, who had served as Trump's media liaison since December, told the president that he vehemently opposed the appointment of New York financier Anthony Scaramucci as communications director, The New York Times reports. According to The Times, Trump wanted Spicer to stay on, but the former press secretary said the president's appointment of Scaramucci was a major mistake.

Scaramucci announced in a Friday afternoon press briefing that Sarah Huckabee Sanders would be replacing Spicer as press secretary — a promotion from her previous role as deputy.

The Washington Post reports that Trump offered Scaramucci the communications director job amid a "widening special counsel probe into his campaign’s possible collusion with the Russian government." The position had remained open since Michael Dubke resigned in May after less than three months on the job.

In the months after Dubke's resignation, Spicer reportedly took on additional work for the White House's communications functions. Huckabee Sanders regularly stood in for Spicer at press briefings this summer — which have frequently been off camera.

Scaramucci became the senior vice president and chief strategy officer at the Export-Import Bank in June and is a Goldman Sachs alumnus. The Post called his appointment "a significant shake-up for a communications shop that has struggled to amplify the president’s message on the administration’s core economic and national security priorities."

Here are some of the best Twitter reactions to Spicer's resignation.