The air of uncertainty and, in some cases, dumbfoundedness, was a stark contrast to the earlier part of the evening, when the major news networks — some of which had been broadcasting at full-tilt for hours already — seemed prepared for an unusually early night.

Anchors and producers received midafternoon exit polls before voting ended on Tuesday afternoon, and those numbers showed Mrs. Clinton with a small advantage, particularly in key states. On Fox News, even as the anchors made clear the race was far from finished, there was room for some easy banter. “We don’t want to hear anything about this election extending beyond this evening,” joked Ms. Kelly, when a guest raised the specter of a recount.

Within a few hours, gentle humor had fallen away. “It is a white-knuckle kind of night,” Norah O’Donnell said on CBS News. “You’re either opening a second bottle of wine or you’re brewing a new pot of coffee.”

A memorable moment occurred when Bill O’Reilly, the Fox News commentator who had been mostly absent from his channel’s coverage on Tuesday, beamed into the set, tieless, through a camera set up in his Long Island home. At the time, Florida appeared to be trending toward Mrs. Clinton, but Mr. O’Reilly was not having it.

“It’s pretty much a dead heat,” he said, jousting with Charles Krauthammer, a Fox News analyst who said he believed Mrs. Clinton still had the advantage.

The exchange was an intriguing departure from what had been a mostly strait-laced evening on Fox News. While the network remains popular with conservative audiences, its new executive chairman, Rupert Murdoch, has pledged an emphasis on straight news reporting since he took over from Roger Ailes, the chairman who was forced out this summer.