Shepard Smith, the longtime Fox News anchor who also headed up the network’s breaking news division, has abruptly left the network after more than two decades, shocking even some of his close colleagues.

Smith’s final show aired Friday afternoon, when he bid his audience a surprise farewell after a particularly tumultuous period of reported infighting between the network’s hard news and opinion divisions. Fox confirmed Smith’s departure in a statement.

“Recently I asked the company to allow me to leave Fox News and begin a new chapter. After requesting that I stay, they graciously obliged,” Smith said. He signed a multi-year contract with the network in March 2018.

The anchor has no plans to move to a different news outlet “at least in the near future,” but will instead spend more time with his boyfriend, Gio Graziano, he said on-air.

“Even in our currently polarized nation, it is my hope that the facts will win the day. That the truth will always matter. That journalism ― and journalists ― will thrive,” Smith said in an apparent nod to President Donald Trump’s war on what he calls “fake news.”

Trump has repeatedly bashed Smith on Twitter for reporting stories that took a critical look at the president and his administration, who are embraced warmly on the conservative cabler’s opinion and analysis side. Smith used his hour to fact-check the president’s claims, once delivering a sober address to his audience after Trump claimed migrants were about to “invade” America. On Thursday, upon hearing unfavorable polling results, Trump complained that Fox News was “much different than it used to be in the good old days,” naming Smith as one supposed culprit. Although the president is an avid Fox News viewer, he is known to turn the channel off during Smith’s show, between 3 and 4 p.m.

Smith had also earned the ire of Tucker Carlson, whose far-right opinion show “Tucker Carlson Tonight” often pushes dubious narratives and occasionally dabbles in conspiracy theories.

Last month, Fox News brass warned Smith against criticizing Carlson on-air, which he did after Carlson attacked Fox legal analyst and former judge Andrew Napolitano for saying Trump had broken the law when he pressured Ukraine to dig up dirt on a political rival. Carlson’s behavior, Smith said, was “repugnant.”

Executives told the hard news anchor “if he does it again, he’s off the air,” one source told Vanity Fair in September.