Sean Spicer, the White House press secretary, quit his position on Friday after telling President Donald Trump he disagreed with the hiring of Anthony Scaramucci as communications director.

Trump offered Scaramucci, a New York financier, the job on Friday morning and reportedly requested that Spicer stay on. Scaramucci said at a White House briefing that “Sean decided that he thought it would be better to go.”

Sarah Huckabee Sanders, who had been Spicer’s deputy, will take over for Spicer as White House press secretary.

See live blog of White House press briefing.

Scaramucci founded the investment firm SkyBridge Capital, and the SALT hedge-fund conference. He regularly defended Trump on television during the campaign and was a campaign fundraiser.

Anthony Scaramucci AFP/Getty Images

Spicer was communications director at the Republican National Committee before joining the Trump team. The 45-year-old was known for being combative with White House reporters and the subject of lampoons by comedian Melissa McCarthy on “Saturday Night Live.”

See:Sean Spicer on Melissa McCarthy’s ‘SNL’ performance: Cute, funny but ‘dial it back.’

Sanders read a statement from Trump at the briefing, saying he was “grateful” for Spicer’s White House service and that he wished him well. “Just look at his great television ratings,” Trump said in the statement.

Scaramucci said he loved Spicer and that “I hope he goes on to make a tremendous amount of money.”

Spicer’s tenure got off to a controversial start when he said Trump’s inauguration was “the most watched ever,” a statement that was later debunked. In recent weeks, Spicer had briefed the press less regularly. Sanders has instead frequently taken the podium at the White House briefings, which have often been held off camera. Before Friday, there had not been an on-camera briefing since June 29.

Spicer said in a tweet on Friday that it had been an “honor” to serve Trump and that he would work through August.

In May, Trump blamed his press team, including Spicer, for failing to put out the public firestorm that erupted after Trump fired James Comey as director of the Federal Bureau of Investigation. As USA Today wrote, the strain in the Trump-Spicer relationship was on display when Trump did not invite the devout Catholic to a meeting with Pope Francis at the Vatican in late May.

In another memorable episode involving Spicer and the media, a Washington Post story in May said he was hiding in bushes at the White House. The Post later said he was “among” the bushes. The story prompted mocked-up pictures of Spicer in bushes, including one on Friday.