David Letterman's departure from his celebrated late-night show will close the book on an era reaching back almost to the birth of television.
During the taping of Thursday's edition of Late Show, he startled his audience with the news that he will step down next year when his current contract with CBS expires.
He said he expected his exit would be in "at least a year or so, but sometime in the not too distant future - 2015, for the love of God, (band leader) Paul (Shaffer) and I will be wrapping things up".
What he'll be wrapping up is three decades on the air - the longest tenure of any late-night talk show host in US television history - since he launched Late Night at NBC in 1982.
More than that, he'll be ending a lineage of late-night hosts who pioneered talk and humour - Johnny Carson and, before him, Jack Paar and Steve Allen.
Ironically, they were all on NBC, the network that denied Letterman the Tonight Show crown he sought. After he lost out to Jay Leno, he pitched his tent at CBS as Leno's rival.
Referring to CBS chairman Leslie Moonves, Letterman told viewers: "I phoned him just before the programme and I said, 'Leslie, it's been great … but I'm retiring.'"
Letterman also thanked the staff and the viewers and joked: "What this means now is that Paul and I can be married."
Since premiering with Late Show in 1993, Letterman, who turns 67 next week, has reigned at Broadway's Ed Sullivan Theatre, a historic venue nearly a century old that was famously home to The Ed Sullivan Show.
Los Angeles-based Leno, 63, retired from The Tonight Show this year, clearing the way, not by his choice, for Late Night host Jimmy Fallon to move up to that television institution. In contrast to Leno, Letterman's decision to quit appears to be his choice.
Moonves said: "For 21 years, David Letterman has graced our network's air in late night with wit, gravitas and brilliance unique in the history of our medium. It's going to be tough to say goodbye."
Letterman, who was a radio talk show host and local television weatherman, moved to Los Angeles in the 1970s. In 1980, he hosted an NBC morning show, which lasted only five months but won two Emmy awards. Two years after that, he was turned loose with Late Night, where he clicked. A generation later, Letterman will leave with an unparalleled comic legacy of laser-focused sarcasm and an ironic sensibility that saturated the culture.
Meanwhile, the famously private Letterman gave the world an occasional glimpse into his inner life in ways that were notable for their intensity.
Viewers will never forget the real-life drama surrounding his quintuple heart bypass and his triumphant return to the air in February 2000, when he brought onstage the doctors and nurses who saved him. He was nearly in tears as he thanked them.
A week after the 9/11 attacks, he delivered a riveting, from-the-heart monologue, connecting with his viewers in their shared mourning and disbelief.
And in 2009, he stunned his audience with a confession that while in a relationship with the woman who became his wife, he had sexual trysts with several of his female employees.
He revealed he was also the victim of an extortion attempt he helped derail by working with police on a sting. What could have been a career-ending scandal displayed him as a master at controlling his message.
Leno held the ratings leadership for most of the two-decade duel with Letterman, but Letterman remained the overwhelming critical favourite.
He earned a Peabody Award in 1992 and a Kennedy Centre Honour in 2012. Late Show won a prime-time Emmy in 1994, one of several showered on his programmes through the years.
Now there remains the question of who will replace him, with Craig Ferguson, host of The Late Late Show, waiting in the wings.