WASHINGTON — Sean Spicer, the White House press secretary, resigned on Friday morning, after denouncing chaos in the West Wing and telling President Trump he vehemently disagreed with the appointment of the New York financier Anthony Scaramucci as communications director.
Mr. Trump offered Mr. Scaramucci the job at 10 a.m. The president requested that Mr. Spicer stay on, but Mr. Spicer told Mr. Trump that he believed the appointment was a major mistake, according to a person with direct knowledge of the exchange.
A spokeswoman for the president, Sarah Huckabee Sanders, was elevated to press secretary. She said Mr. Trump is grateful for Mr. Spicer’s service and that the president believes Mr. Spicer will succeed going forward.
“Just look at his great television ratings,” Mr. Trump said in a statement read by Ms. Sanders during a White House briefing on Friday.
Mr. Spicer’s turbulent tenure as the president’s top spokesman was marked by a combative style with the news media that spawned a caricature of him on “Saturday Night Live.”
He had hoped to last a year. He lasted six months and a day.
Mr. Scaramucci joined Ms. Sanders on the podium and said he had great respect for Mr. Spicer, adding, “I hope he goes on to make a tremendous amount of money.”
Mr. Scaramucci founded the global investment firm SkyBridge Capital and is a Fox News contributor. He is known for his spirited on-air defense of Mr. Trump, but he also enjoys good relationships with journalists from an array of outlets, including those the president has labeled “fake news.”
Mr. Scaramucci acknowledged the awkwardness of Mr. Spicer’s resignation.
“This is obviously a difficult situation to be in,” Mr. Scaramucci said.
Mr. Spicer’s rumored departure has been one of the longest-running internal sagas in an administration brimming with dissension and intrigue. A former Republican National Committee spokesman and strategist, Mr. Spicer was a frequent target of the president’s ire — and correctives — during the first few months of the administration.
The resignation is a serious blow to the embattled White House chief of staff, Reince Priebus, the former Republican Party chairman who brought Mr. Spicer into the West Wing despite skepticism from Mr. Trump, who initially questioned his loyalty. Mr. Scaramucci described his relationship with Mr. Priebus as brotherly where they “rough each other up.” He called Mr. Priebus a “good friend.”
Mr. Trump’s son-in-law, Jared Kushner, has grown critical of both Mr. Spicer and Mr. Priebus, whom he regards as party establishment figures who operate out of self-interest.
Mr. Kushner also supported Mr. Trump’s decision to supplant Marc Kasowitz as his lead attorney on matters pertaining to Russia, according to people familiar with the situation.
Mr. Scaramucci was to meet with Mr. Priebus on Friday, according to a West Wing official — and applause could be heard in the second-floor communications hallway when Mr. Scaramucci was introduced. Mr. Priebus denied that there is friction with Mr. Scaramucci.
For his part Mr. Spicer said it had been an “honor” and “privilege” to serve Mr. Trump.
Ms. Sanders often conducts daily briefings, but it was not clear whether she will take over Mr. Spicer’s duties. He has agreed to stay on for two weeks to a month, and Mr. Trump has told his advisers he is open to rotating new people into the slot, including one of the president’s personal favorites, Sebastian Gorka, a blustery foreign policy official who has been accused of having ties to far-right groups in Europe.
During the transition, Mr. Trump had planned to appoint Mr. Scaramucci, a 52-year-old Harvard Law graduate from Long Island, as director of his office of public liaison, but the offer was pulled at the request of Mr. Priebus over concerns about Mr. Scaramucci’s overseas investments.
His appointment Friday came two months after the previous communications director, Mike Dubke, stepped down. Mr. Trump was frustrated with Mr. Priebus over the slow pace of finding a replacement, according to a half-dozen people familiar with the situation.
Mr. Trump made the appointment over the objection of Mr. Priebus, who thought Mr. Scaramucci lacked the requisite organizational or political experience. But the president believed Mr. Scaramucci, a ferocious defender of Mr. Trump’s on cable television, was best equipped to play the same role in-house, and he offered him a role with far-reaching powers independent of Mr. Priebus’s.