Shepard Smith has exited Fox News.

The midday anchor, who had been with the network since its inception in 1996, stepped down from his role as chief news anchor and managing editor of the network’s breaking news unit and anchor of Shepard Smith Reporting effective immediately the network said in a release.

He will be replaced by a rotating line-up of hosts until a replacement is selected to take over at the 3pm hour.

'Shep is one of the premier newscasters of his generation and his extraordinary body of work is among the finest journalism in the industry,' said Fox News Media president Jay Wallace.

'His integrity and outstanding reporting from the field helped put Fox News on the map and there is simply no better breaking news anchor who has the ability to transport a viewer to a place of conflict, tragedy, despair or elation through his masterful delivery.'

The decision to exit Fox News was made by Smith, and only Smith, publicists for both the anchor and the network said on Friday.

This move comes two weeks after Smith was openly mocked by Tucker Carlson for calling a attack on one their colleagues 'repugnant.'

Scroll down for video

The Grand Poobah: Shepard Smith (above) is leaving Fox News after 24 years he announced on Friday

Partner: Smith, 55, said that he was looking forward to spending more time with his partner Giovanni Graziano, 31, and their dog Lucia (Smith and Gio in 2015)

Multiple sources told DailyMail.com that Smith's departure came as a total shock to most at the network.

He was brought in to audition after Roger Ailes saw his coverage for Fox affiliates during the OJ trial (above in 1996)

Smith had just signed a multiyear contract 18 months ago, and at the time said he was 'extremely thankful for the opportunity to continue to lead our breaking news coverage for years to come.'

Rupert Murdoch said at the time: 'Shepard Smith is an exemplary journalist whose skill in anchoring breaking news is unrivaled. His powerful storytelling on both television and digital platforms has elevated our entire news gathering process.'

Sources also said that Smith was escorted out after his final appearance, but it was unclear if that was at the request of the network or for his benefit should there be photographers waiting outside the building.

A spokesperson later told DailyMail.com that it was in fact Smith's own security detail who walked him out on Friday.

His partner Giovanni Graziano, who was a production assistant on Smith's show for just over a year before moving over to Varney & Co. on the Fox Business Network in 2012, also deleted his Linked In profile.

'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,' said Smith.

'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.'

PRES. TRUMP ON SMITH'S EXIT MARTOSKO: Did you or your administration pressure Fox News to get rid of Shepard Smith? TRUMP: No, I don't know. Is he leaving? MARTOSKO: He's leaving. TRUMP: Oh, that's a shame. MARTOSKO: Then why did Bill Barr meet with Rupert Murdoch the other night? TRUMP: That I don't know. Wait, did I hear Shepard Smith is leaving? MARTOSKO: Yes. TRUMP: Is he leaving because of bad ratings? Tell me. I don't know. He had terrible ratings. Is he leaving because of his ratings? I mean, if he's leaving I assume he's leaving because he had bad ratings. MARTOSKO: You didn't put any pressure on anybody? TRUMP: He had the worst ratings on Fox. So there's a reason. Why is Shepard Smith leaving? MARTOSKO: You'd have to ask him, Mr. President. TRUMP: Well I wish him well. I wish Shepard Smith well. Advertisement

He continued: 'I’ve worked with the most talented, dedicated and focused professionals I know and I’m proud to have anchored their work each day — I will deeply miss them.'

Smith also made it clear that he will be off he air for at least some time.

'Under our agreement I won't be reporting elsewhere, at least in the near future, but I will be able to see more of [my partner] Gio and [our dog] Lucia and our friends and family and then we will see what comes along,' said Smith.

'This is my last newscast here. Thank you for watching today and over the decades.'

He then closed out his final newscast by stating: 'It's been an honor and my pleasure.'

The news came as a big surprise to Neil Cavuto, who follows Smith the in the 4pm hour.

His face appeared visibly shocked at the start of his show as he remarked on what a important part of the Fox News team Smith had been for the past three decades.

'Whoa,' said Cavuto.

'Like you, I'm a little stunned.'

Smith, who left University of Mississippi two credits shy of a degree to take his first job, got his start on Fox News after catching the eye of Roger Ailes.

He has said in the past that Ailes saw him reporting on the OJ Simpson trial for Fox affiliates and then called him asking if he would fly to New York City to talk more about the possible new position.

Soon after, Smith moved to New York City and began his career at the network.

In the past few years he has come under fire while at the same time being praised for his coverage of President Donald Trump.

It all kicked off in 2016 when he said that Trump 'trades in racism' during the primary, and Smith has remained one of the network's few critics of the president ever since.

Comments like those are why President Trump never appeared on Smith's show, despite the anchor reaching out to his campaign for an interview.

'I would like to have some time with him,' said Smith back in 2016.

'For me, at least, it would be interesting to go through the things he’s said and the things he’s done and try to get an explanation.'

When asked about Smith's departure on Friday by DailyMail.com, President Trump said: 'Is he leaving because of bad ratings? Is he leaving because of me?'

Smith also came out as gay in recent years, giving a rare glimpse into his private life during an interview with Time.

In that story Smith, 55, acknowledged his relationship with 31-year-old Giovanni Graziano.

'I have a longtime boyfriend and we're as happy as we can be,' revealed Smith.

'We live a very normal life and go to dinner and go to games and see his family and see my family.'

He then added: 'It's great for us, but I can't imagine anyone else finding it interesting.'