Whenever President Trump is in a tight spot, things get tricky for Fox News.

The cable network’s most popular hosts have largely supported Mr. Trump and his agenda. The network’s highest-rated host, Sean Hannity, took the stage with him at a rally in Missouri last month. Mr. Trump even hired the former Fox News co-president, Bill Shine, as the head of his communications team, and he has made no secret of the fact that he likes to start the day with the show “Fox & Friends.”

On Thursday night and Friday morning, they faced the challenge of filling airtime with talk about the president just as he found himself in the middle of a crisis. And while the nighttime commentators tiptoed around a president in trouble, the morning host Brian Kilmeade was bluntly critical. In not toeing the White House line, he was following the lead of the firebrand writer Ann Coulter and the radio host Rush Limbaugh.

The conservative media stars had a lot to work with. On Thursday Jim Mattis, the defense secretary, resigned in protest over the president’s decision to pull American forces out of Syria — a move followed by news of a troop drawdown in Afghanistan.

The governmental drama also included Mr. Trump’s blowing up a deal that would have allowed the government to avoid a shutdown over his demand of $5 billion for a border wall.