Fox's GOP debate was watched by 24 million viewers on Thursday night, according to Nielsen data, making it the highest-rated primary debate in television history.

The event, featuring Donald Trump in his first debate, was also the highest-rated telecast in the nearly 20 year history of the Fox News Channel, a spokeswoman said.

Rival executives and campaign aides also predicted unusually high ratings for the event, thanks to curiosity about Trump and the controversy over the "top ten" candidate criteria.

But the ratings shattered even the rosiest expectations for the beginning of debate season. Television executives were stunned.

For perspective, the first GOP primary debate four years ago, also on Fox, attracted 3.2 million viewers.

The most-watched primary debate that year, broadcast by ABC, reached 7.6 million.

Thursday's debate audience more than tripled that one.

The audience easily exceeded pretty much everything that's been on American television this year, from the finale of "The Walking Dead" to the final episode of David Letterman's "Late Show."

The debate was bigger than all of this year's NBA Finals and MLB World Series games, and most of the year's NFL match-ups.

It also trumped Jon Stewart's Thursday night's sign-off from "The Daily Show," which averaged 3.5 million viewers.

Trump is a known ratings magnet. His reality show "The Celebrity Apprentice" used to reach 20 million viewers a week. But it has slipped over the years, averaging 6 to 8 million viewers for recent seasons.

Now, through the debate process, it seems, Trump's ratings are back up.

(Naturally, he took credit for the sky-high ratings in a tweet.)

For Trump and the nine other people on stage who want to be president, the exposure was enormously valuable.

Conversely, about 6.1 million viewers tuned in for the "undercard" debate at 5 p.m. That means the seven candidates who didn't make the cut for prime time, like Rick Perry, reached just a quarter as many viewers.

The ratings are good news not only for Fox but for other media organizations that are sponsoring Republican debates. The "Trump show," as some have called it, seems likely to continue into the fall.

The next debates are set for September 16 (on CNN) and October 28 (on CNBC).

Related: has Fox News turned against Donald Trump?

Fox News typically has between 2 and 3 million viewers in prime time, so the debate was at least an eight-fold increase.

There was a spike in viewership right at 9 p.m. as the debate began, and the audience stayed for the whole thing. Fox peaked at one point with 26.8 million viewers.

A post-game show anchored by Megyn Kelly had 11.1 million viewers, a 1000% increase over the time slot's usual total viewership.

Gabriel Debenedetti of Politico noted that more people watched the prime time debate "than voted over the course of the entire 2012 GOP primary (18.9 million)."

On Thursday night there was immediate indication of the audience's interest: the debate dominated social chatter on Twitter and Facebook.

There was also trouble with Fox's web stream.

Fox made the debate available online to cable and satellite subscribers, but many users on Twitter said they had a tough time accessing it.

A Fox spokeswoman confirmed the problems and said "an unprecedented, overwhelming demand caused server issues in the debate live stream."

The Future of Media, a customized magazine