Fox News slipped to third place in the primetime demo for the first time in 17 years last week as competitors CNN and MSNBC enjoyed a surge in viewership thanks to a chaotic news week for President Donald Trump’s administration.

For the week of May 15-19, Fox News averaged just 497,000 viewers in the advertiser-coveted key demo of adults 25-54 during primetime hours, compared to CNN’s 589,00 and MSNBC’s 611,000, according to the Hollywood Reporter, which cited data from ratings tracker Nielsen.

However, the longtime cable news king remained second in total viewership, with an average of 2.41 million viewers over the course of the week, compared with CNN’s 1.65 million and MSNBC’s leading 2.44 million. Fox News also remained in the lead in primetime and total day viewership for the month of May.

Flagship shows such as CNN’s Anderson Cooper 360 and MSNBC’s The Rachel Maddow Show performed particularly well, while Fox has seemingly struggled with the loss of Bill O’Reilly’s The O’Reilly Factor, which had consistently led all cable news programs in the ratings for the better part of two decades. O’Reilly departed the network last month following a report that he had allegedly settled multiple claims of sexual harassment with high-dollar payouts.

As a result, Fox News’ primetime lineup has undergone perhaps its most significant shake-up ever, with anchor Tucker Carlson now hosting the 8 p.m. hour and the panel show The Five moving to 9 p.m.

Meanwhile, MSNBC and CNN likely benefitted from a week of seemingly non-stop breathless coverage of Trump and his administration, including the firing of former FBI Director James Comey and allegations that the president shared classified information with Russian government officials during a meeting at the White House.

The ratings news comes as Fox News co-owner Rupert Murdoch held a company-wide meeting at the network’s New York City headquarters last month to unveil a new second-floor studio, Studio F, which will replace the network’s longtime basement operations center. Murdoch also reportedly discussed the overall direction and future of the company, with the meeting being conducted in two shifts so as to include all employees.

The ratings developments also come less than a week after the death of former CEO Roger Ailes. Ailes died Thursday due to complications from a subdural hematoma he sustained after a fall at his home, according to the Palm Beach County medical examiner.

You can follow Ben Kew on Facebook, on Twitter at @ben_kew, or email him at bkew@breitbart.com