Jon Stewart, whose wit defined "The Daily Show" for more than 15 years, will sign off the iconic Comedy Central program later this year.
"In my heart I know it is time for someone else to have that opportunity," he said on Tuesday night's show as his studio audience gasped.
Members of the audience yelled "we love you Jon" as he expressed his appreciation for the show's staff and called hosting it "the honor of my professional life."
It isn't clear when Stewart will sign off; his contract expires in September, but he may leave as soon as July, or as late as December, he said.
In a farewell statement, Michelle Ganeless, the president of the channel, called Stewart "a comic genius, generous with his time and talent," and said the host "will always be a part of the Comedy Central family."
Speculation about potential successors started immediately. "The Daily Show" is Comedy Central's single most important brand, and it's not going anywhere.
Ganeless said the show "has become a cultural touchstone for millions of fans and an unparalleled platform for political comedy that will endure for years to come."
But it will not be the same. Stewart replaced Craig Kilborn as the host of the 11 p.m. ET news satire in 1999 and made the show his own. It is strange to imagine anyone else sitting in his chair.
So Tuesday's announcement was met with a mix of shock and even sadness as many on social media braced for a satirical future without Stewart. Twitter said there were more than 130,000 tweets sent about Stewart's departure between 6:30 and 8 p.m. ET, when the news initially spread.
"Shocked & sad to see the man who gave me my big break on @TheDailyShow is ready to hang it up," tweeted actor Josh Gad. "Can't wait to see what's next!"
Others observed that TV wasn't just losing a late-night comedy host, but also a sharp-eyed media critic, a man who regularly challenged and mocked news outlets like CNN.
"No way to put a figure on his value to [Comedy Central]," tweeted former New York Times TV reporter Bill Carter. "He literally put that network on [the] map personally. Truly irreplaceable."
And he helped the careers of a whole universe of other comedians, as well.
Over the years Stewart influenced the worlds of news and comedy with his wickedly funny monologues and probing interviews, and he sometimes showed that the two worlds aren't as far apart as they might seem.
Stewart was often credited with educating his fan base -- which includes many millennials -- about the news, even if only unintentionally.
A 2006 study proposed something called "The Daily Show Effect," where Stewart's humor has a positive effect on political participation.
Under Stewart's leadership, "The Daily Show" won 20 Emmys, making it one of the most acclaimed shows on TV.
When Stewart signed his most recent contract, it came as a surprise to some observers, given his long tenure at the program and his publicly expressed interest in trying other things. He recently directed his first feature film.
In a series of interviews to promote his film, "Rosewater," in November, Stewart acknowledged that he had been contemplating his future.
When a New York magazine reporter asked whether the 2016 presidential election might motivate Stewart to stay at "The Daily Show," Stewart said yes.
But he added, "Part of the thing to remember is this is not the only process by which you can work material, and sometimes it's more important to step back and reconfigure a conversation than continue the same conversation because you know how to do it."
On Tuesday night's show, Stewart said he doesn't "have any specific plans" -- perhaps pre-empting inevitable questions about his future.
He also acknowledged that he's been eyeing other work, saying, "This show doesn't deserve an even slightly restless host and neither do you."
Stewart also thanked his bosses at Comedy Central, which is owned by Viacom, and remarked that "17 years is the longest I have ever, in my life, held a job, by ... 16 years and five months."
Stewart's announcement came two months after his longtime late-night companion on the channel, Stephen Colbert, ended the "Colbert Report." Colbert will take over CBS's "The Late Show" this fall.
Colbert's successor Larry Wilmore started a new program, "The Nightly Show," that now follows "The Daily Show."