Hollywood stars Steve Martin and Tina Fey, comedians Chris Rock and Jerry Seinfeld and a host of US presidents joined the band Foo Fighters to bid farewell to David Letterman as the veteran Late Show host signed off for the last time.
The show as expected featured no sit-down guest interviews, relying heavily on clips of Letterman shows going all the way back to his 1980s morning show on NBC.
It opened with news footage of former President Gerald Ford intoning, out of context: “Our long national nightmare is over,” referring at the time to the Watergate scandal.
In succession, presidents George H and George W Bush, Bill Clinton and finally Barack Obama all repeated Ford's pronouncement verbatim, with Obama adding, “Letterman is retiring.”
A bevy of top names turned up for one of Letterman's signature bits, the nightly Top 10 list, which was entitled "top 10 things I've always wanted to say to Dave." Barbara Walters, Jim Carrey, Peyton Manning, Julia Louis-Dreyfus, Alec Baldwin, Jerry Seinfeld, Chris Rock, Bill Murray, Fey and Martin took aim.
"I'm just glad your show is being given to another white guy," was Rock's contribution, a reference to Letterman's successor Stephen Colbert who takes over in September.
Tributes also came from long-running television shows including The Simpsons and Wheel of Fortune.
David Letterman through the years
David Letterman through the years
1/10 David Letterman
Jay Leno, left, hosted by David Letterman on The Tonight Show in 1979
2/10 David Letterman
David Letterman sits at his desk on the television series 'Late Night with David Letterman,' New York, 1986
3/10 David Letterman
David Letterman holds an Emmy trophy after his win in 1987
4/10 David Letterman
David Letterman will retire after 31 years as America's longest-standing late night TV show host
5/10 David Letterman
Madonna holds hands with television talks show host David Letterman at the 11th Annual MTV Video Music Awards in New York in 1994
6/10 David Letterman
David Letterman and Harrison Ford ride horses named Chase and Shane outside the Ed Sullivan Theater in New York, 2011
7/10 David Letterman
David Letterman speaks onstage at the First Annual Comedy Awards at Hammerstein Ballroom in New York City, 2011
8/10 David Letterman
David Letterman and Oprah Winfrey attend 'A Conversation With David Letterman And Oprah Winfrey' at Ball State University in Muncie, 2012
9/10 David Letterman
David Cameron was welcomed on to the Late Show by host David Letterman to the tune of the house band playing Rule Britannia and dry ice pumping into the studio to replicate a London fog
10/10 David Letterman
US President Barack Obama tapes an appearance on the 'Late Show with David Letterman' in New York, 2015
Notably absent was longtime rival and former Tonight Show host Jay Leno, although Letterman quipped in his monologue “I'll be honest with you - it's beginning to look like I'm not going to get The Tonight Show.”
More of his trademark self-deprecation followed when he observed that he had done more than 6,000 shows, then joked that noted physicist Stephen Hawking had calculated “It works out to about eight minutes of laughter.”
The 68-year-old host, famed for his quick wit, sarcasm, offbeat humor, often snarky attitude and silly stunts, hosted top stars and presidents in his final weeks, much as he did during 33 years on late night television at NBC and CBS.
For his swansong, Letterman, who started in television as a weatherman in his native Indianapolis, dropped his edginess and instead thanked his staff, his audience and CBS executives, including president and CEO Les Moonves who was on hand.
Letterman even took a moment to introduce his wife Regina and son Harry as the lights briefly came up in the Ed Sullivan Theater in Manhattan's Times Square district.
The show, which ran long at more than one hour and 15 minutes, ended as Letterman told viewers "thank you and good night," turning the stage over to his favorite band Foo Fighters who performed "Everlong" to a montage of clips.
In a final image, he blew a kiss to the cheering audience.
"It was a heart-warming and heartfelt goodbye," said Victor King of Los Angeles, who flew in to attend the historic show.