FILE PHOTO: Roger Ailes, chairman and CEO of Fox News attend Fox network summer press tour in Pasadena

Roger Ailes, chairman and CEO of Fox News and Fox Television Stations, answers questions as Fox news anchor Shepard Smith takes questions via satellite from Kiryat Shmona, Israel, during a panel discussion at the Television Critics Association summer press tour in Pasadena, Calif., on July 24, 2006.

Shepard Smith, one of Fox News' leading anchors and a frequent critic of President Donald Trump, abruptly stepped down from the network on Friday, departing with little explanation after 23 years on the air.

Smith, Fox's chief news anchor and host of its afternoon news program, "Shepard Smith Reporting," said the decision to leave was his own, but gave no further reason for his resignation. He signed off with a brief statement, surprising even his colleagues. Fox said Friday's program would be Smith's last.

Smith has been at Fox News since its founding in 1996, and is one of its signature figures. He was among the first people hired by Fox's co-founder, the late Roger Ailes. for the network's launch. He was reportedly in the middle of a long-term contract, making his resignation--and Fox's agreement to release him--highly unusual.

His recent tenure, however, has been marked by conflict and criticism, not just from President Trump but from within Fox itself. The internal tensions at Fox appear to have led to his resignation, people at the network said.

Earlier this month, he engaged in an extraordinary war of words with Tucker Carlson, one of the Fox's most popular hosts. Smith called Carlson "repugnant" for not defending Fox legal analyst Andrew Napolitano when a guest on Carlson's program called Napolitano "a fool" for criticizing Trump's efforts to gain damaging information on Democratic rival Joe Biden from the president of Ukraine.

Carlson fired back, clearly referring to Smith but not naming him: "Unlike maybe some dayside hosts, I'm not very partisan."

A former Fox staffer who has recently been in touch with Smith said that the spat with Carlson was a last straw, and that Smith had grown frustrated in recent months by the repeated attacks on the news division by other opinion hosts. Fox declined comment on the reasons for Smith's resignation.

In farewell remarks, Smith said, "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. The opportunities afforded this guy from small town Mississippi have been many. It's been an honor and a privilege to report the news each day to our loyal audience in context and with perspective, without fear or favor."

Smith has often incurred the wrath of some loyal Fox viewers by his skeptical reporting and commentary on the president, in stark contrast to its primetime and morning hosts, who often flatter the president. Trump has given frequent interviews to his most loyal Fox personalities, but has never sat for one with Smith.

Smith's criticism of Trump dates to the beginning of Trump's presidency. After a presidential press conference in early 2017, for example, he called some of Trump's responses "absolutely crazy." He went on to defend CNN, Fox's rival news network, when Trump called its reporting "fake news."

"CNN's reporting was not fake news," Smith said at the time. "Its journalists follow the same standards to which other news organizations, including Fox News, adhere."

More recently, he urged Fox viewers to read special counsel Robert Mueller's report of his investigation into Russian meddling in the 2016 election, strongly suggesting that it didn't exonerate the president, as Trump and attorney general William Barr had suggested. "Everyone in America should read" it, he said on the air. "Everyone."

Trump, in turn, has sometimes disparaged Smith by name on Twitter, viewing him as an apostate at a network he believes should be loyal to him.

While complaining about a new Fox poll showing a majority of Americans favor his impeachment, Trump on Thursday tweeted, "@FoxNews is...much different than it used to be in the good old days." He named Smith as one of the people at Fox who "doesn't deliver for US anymore. It is so different than it used to be. Oh well, I'm President!"

In August Trump referred to Smith as "low ratings Shep Smith," calling him "hopeless and clueless." And in a tweet earlier that month, he wrote "Watching Fake News CNN is better than watching Shepard Smith, the lowest rated show on @FoxNews. Actually, whenever possible, I turn to @OANN," a small cable-news competitor.

According to Nielsen Media Research, Smith's program dominated its time period, outdrawing competing programs on MSNBC and CNN by 48 percent and 81 percent, respectively, during the third quarter. His program attracted an average of 1.28 million viewers during the period. However, it was often the lowest rated daytime program in Fox's lineup.

Smith's departure coincided with reports this week that Barr traveled to New York to meet with Fox Corp. chairman Rupert Murdoch at Murdoch's home in New York City. Neither side explained the reason for the meeting.

Asked by reporters on Friday for his reaction to Smith's resignation, Trump responded with mock sympathy. "Is he leaving?" he said. "Oh, that's a shame... Is he leaving because of terrible ratings? If he's leaving, I assume he's leaving for bad ratings...Well, I wish him well."

In his final broadcast on Friday, Smith said he had struck an agreement with Fox in which "I won't be reporting elsewhere at least in the near future," an apparent reference to a "non-compete" agreement that keeps departing TV news personalities from joining competitors. He did not announce any plans other than spending time with family and friends. "Then we'll see what comes along," he said.

Chris Giglio, Smith's personal spokesman, said the decision to leave Fox "was Shep's, and his alone." Giglio said Smith would take some time off but "he is not retiring."

According to a separate Fox staffer with knowledge of the matter and who requested anonymity in order to speak about internal matters, Smith signed a new contract in March of 2018, estimated at just under $15 million a year, but recently asked to be released from the contract. He had grown frustrated by the repeated attacks from opinion hosts on his news colleagues, this person said.

But his unease at the network goes back much father, according to another person familiar with his thinking. Smith had grown uncomfortable with the increasingly Trump-friendly tone of the network, and his departure was due to an accumulation of that unease combined with increasingly public insults and digs from outspoken opinion hosts, who have not been shy about registering their disdain for their news colleagues.

He signed off, "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. I'm Shepard Smith, Fox News, New York."

His announcement was clearly a surprise to his newsroom colleagues. Neil Cavuto, who hosts the Fox show immediately following Smith's newscast, reacted with a single word when Smith threw the broadcast to him: "Whoa."