Shepard Smith, Fox News' chief anchor, who has long reported critically on President Donald Trump and his administration, is resigning from Fox after 23 years with the network.

Jay Wallace, the president of Fox Media, said Friday was Smith's last day on the job in a memo published by The Daily Beast's Max Tani.

Smith announced that he resigned from his post even as Fox asked him to stay on.

"The opportunities afforded this guy from small-town Mississippi have been many," Smith said in his last monologue on Friday. "Even in our currently polarized nation, it's my hope that the facts will win the day, that the truth will always matter, that journalism and journalists will thrive."

Visit Business Insider's homepage for more stories.

Shepard Smith, Fox News' chief anchor, who has long reported critically on President Donald Trump and his administration, shocked his colleagues and viewers by resigning from Fox on Friday after 23 years at the network.

Jay Wallace, the president of Fox Media, said Friday was Smith's last day on the job in a memo published by The Daily Beast's Max Tani.

Smith announced that he resigned from his post even though Fox asked him to stay on.

"Recently I asked the company to allow me to leave Fox News and begin a new chapter," Smith said. "After requesting that I stay, they graciously obliged."

This comes weeks after Smith exchanged on-air barbs with his fellow Fox host Tucker Carlson over Smith's coverage of the Trump impeachment probe.

"We respect his decision and are deeply grateful for his immense contributions to the entire network," Wallace said.

Smith gave an overview of his long career at Fox in a final monologue on Friday, during which he dropped the news of his resignation.

"The opportunities afforded this guy from small-town Mississippi have been many," Smith said. "Fox News has allowed me to travel the country and the world gathering the facts of the day for you. At Columbine, Katrina, Iraq, Israel, Lebanon, 9/11, and every life-altering event along the way. I have met leaders, heroes, and victims of all stripes."

He concluded, "Even in our currently polarized nation, it's my hope that the facts will win the day, that the truth will always matter, that journalism and journalists will thrive."

Smith's Fox colleagues appeared stunned by Smith's announcement on Friday.

"Whoa," Neil Cavuto, whose show airs immediately after Smith's, said at the beginning of his program on Friday. "I'm a little stunned and a little heartbroken. I don't know what to say. Shepard Smith, as I said just a few days ago on this very network, a decent human being ... a better newsman, you probably cannot find ... I'm sorry if I'm a little shell-shocked here, but I'm going to miss my buddy."

"I first worked with Shep on my first assignment at @FoxNews almost 23 years ago," Bret Baier, another Fox host, tweeted on Friday. "It was a total shock today to find out he's leaving. He anchored breaking news -fast-moving events — better than anyone."