Sean Spicer announced on Friday morning that he would resign as White House press secretary. Chip Somodevilla/Getty Images Sean Spicer, the White House's embattled press secretary, announced his resignation on Friday morning, after telling President Donald Trump he strongly disagreed with his selection for White House communications director.

Spicer tweeted that it had been "an honor & a privilege to serve" Trump and "this amazing country."

"I will continue my service through August," he added.

The New York Times first reported Spicer's resignation.

Trump offered Anthony Scaramucci the top communications post around 10 a.m. Friday. According to The Times' sources, Spicer told the president he believed the decision was a significant misstep.

Scaramucci, an investment-firm founder and top Trump donor and surrogate, became the senior vice president and chief strategy officer of the Export-Import Bank last month.

He had been denied the role of director of the White House's Office of Public Liaison as questions swirled over ethics conflicts stemming from the sale of his firm, SkyBridge Capital, to a division of HNA Group, a Chinese company with ties to the Communist Party, according to The Times.

Reince Priebus, the White House chief of staff, is reportedly opposed to the hire and believes Scaramucci does not possess the necessary political experience and skill set to lead the communications team. He told reporters on Friday, however, that he supported Scaramucci "100%."

After Mike Dubke resigned in May after three months as communications director, Spicer took on some of his responsibilities, and Deputy Press Secretary Sarah Huckabee Sanders largely assumed Spicer's press-briefing duties. Had he stayed, Spicer would have reported to Scaramucci.

Spicer has long been a fixture of the Washington political establishment, previously serving as the spokesman for the Republican National Committee.

Spicer, whose frequent portrayals on "Saturday Night Live" made him a household name, has been widely criticized by the media and Democrats for blunders and misleading statements he has made at the podium.

In April, after dozens of Syrians were killed in a chemical attack US officials said was ordered by Syrian President Bashar Assad, Spicer made headlines when he falsely claimed that unlike Assad, Adolf Hitler didn't use chemical weapons.

When Spicer was asked during a White House press briefing whether he thought there was any reason to think Russia would pull back its support of Syria, its ally for decades, he muddled some facts about World War II.

"We didn't use chemical weapons in World War II," he said. "You had someone as despicable as Hitler didn't even sink to using chemical weapons. If you're Russia, you have to ask yourself if this is a country and regime that you want to align yourself with."

But the World War II-era German dictator famously did use chemical weapons in gas chambers to exterminate millions of Jewish people, LGBTQ people, and others in Eastern Europe. The press secretary's claim was immediately rebuffed by reporters in the room and on people on social media, where his comments went viral. Some Democrats, including House Minority Leader Nancy Pelosi, called on Spicer to resign.

He apologized the next day for his comment, saying: "I made a mistake; there's no other way to say it."

Spicer began his 182-day tenure on shaky ground when he attacked reporters at his first press briefing and falsely claimed that the crowd at Trump's inauguration was the largest in American history.

"This was the largest audience to ever witness an inauguration, period, both in person and around the globe," he said, contrary to photos and other evidence of a smaller audience than the one at President Barack Obama's 2009 inauguration.

The White House didn't immediately respond to a request for comment.