David Letterman gestures to his son, Harry, as his wife Regina waves to the crowd at the Kennedy Center Concert Hall, where he is being honored with the Mark Twain Prize for American Humor. (Kate Patterson/for The Washington Post)

For years, David Letterman, consumed by insecurities and the relentless pace of a nightly television program, would respond to the loud cheers of his audience with a strained smile and a half-scolding, half-embarrassed wave to "cut that out."

But Sunday night, the late-night legend found himself stuck in a seat where he couldn't silence his admirers.

As Letterman watched from a box with his wife, Regina, and 13-year-old son Harry, the former television host was lauded as the Kennedy Center's 20th recipient of the Mark Twain Prize for American Humor by a stunning array of performers. They talked of how he re­invented late-night television with oddball bits, as well as of his ability to deliver comforting words during the worst of times. They saluted him, cheered him and made sure to mock him for his restless, unsatisfied energy and relentless beard.

"I'll tell you something, Marty," Steve Martin said, presenting with Martin Short during the night's first tribute. "Dave has always had spot-on comedic instincts. What better time than right now to insist on looking like a Confederate war general?"

And in an unbilled appearance, Letterman's psychiatrist, Clarice Kestenbaum, delivered one of the night's punchiest paragraphs.

"If you ever need a solid 45-minute nap, drop in," Kestenbaum said. " 'I'm dumb. People hate me. I have E.D.' Oh, Jesus, what a f---ing pity party. Don't get me wrong: He's crazy. Not Trump crazy. But who knows?"

There were two purposes to the evening: to praise Letterman because, as Jimmy Kimmel said, "No one from his generation influenced American comedy more," and to offer a night packed with enough laughter to honor that legacy.

Letterman's past provided a good dose of comedy, as the audience was treated to old clips from both his NBC and CBS shows. These included him working at a fast-food drive-in, watching a pig dunk a basketball during a "Stupid Pet Tricks" segment, and interviewing Dorothy Mengering — better known to his show's fans as "Dave's Mom" — as she delivered a report from the 1994 Winter Olympics in Lillehammer, Norway.

The sometimes incongruent scope of Letterman's career was on full display as Sen. Al Franken (D-Minn.) talked of Letterman's concern for the environment and then sang the praises of the show's "Monkey Cam." Jimmie Walker, who hired Letterman in the 1970s for his writing staff, remembered trying to comfort the host after NBC canceled his short-lived morning show in 1980. Kimmel praised Letterman's monologue after the World Trade Center attack and how, because of moments like those, "you hear talk show hosts speaking passionately about serious subjects all the time."

Jimmy Kimmel and his wife Molly arrive at the Kennedy Center to salute Letterman. (Kate Patterson/for The Washington Post)

Sen. Al Franken (D-Minn.), his wife, Franni, left, and daughter, Thomasin, hit the red carpet. (Kate Patterson/for The Washington Post)

And then there was Bill Murray, last year's Twain winner, who arrived in full Elizabethan garb to the strains of Herman's Hermits' "I'm Henry VIII, I Am."

"You will be able, as the Twain, to walk up to any man or woman and take a burning cigar from their mouth and finish it. You will be able to board any riverboat."

Letterman clapped in delight at that line.

Then Murray had a cheeseburger delivered to the stage, took a bite and demanded that trays of burgers be delivered to Letterman's box.

"Harry, I want you to be a generous prince," Murray instructed Letterman's son. "Throw a pickle to your people. Toss a pickle to your people."

Harry first seemed to shake the request off — when you're a teenager on camera in front of a packed house, even Bill Murray in a feathered hat isn't going to push you around. So Dad stepped in, plucking a tomato and handing it to his boy. Harry tossed it, and Murray proclaimed: "He's going to be a good one."

Short sang a tribute to Letterman and reminded him that "not everyone can say they were the number one late night host for two years in the early '90s." Bill Hader and Fred Armisen, in gray wigs and playing a pair of childhood friends from Indiana, created a short spoof film. They made reference to the bitter battle won by Jay Leno to replace Johnny Carson as host of "The Tonight Show."

"Before that, I was a big Leno fan, but after that, I never watched more than the opening monologue," Hader said in character.

"But after the monologue, I promised I'd switch over to Dave," said Armisen.

"Depending on who the first guest was," Hader added.

Pearl Jam's Eddie Vedder, on a custom Fender acoustic adorned with Tom Petty's initials, performed a song by Warren Zevon, a musician particularly loved by Letterman.

Zevon regularly filled in as Letterman's music director when Paul Shaffer needed time off. He was most famously Letterman's only guest the night before Halloween in 2002, when he was dying of cancer. "Keep Me In Your Heart," performed during the ceremony by Vedder, was the last song on Zevon's final album.

Norm Macdonald, who performed the final stand-up act on Letterman's "Late Show" in 2015, arrived to tell the crowd that the Twain Prize was actually still to be determined by their vote.

Would it be Letterman or retired Congolese American basketball star Dikembe Mutombo, he asked, as images of both flashed on the screens behind him.

"And no, David Letterman does not stand 7 foot and six, but the point is, he doesn't have to," Macdonald said. "He's not a basketball player or some kind of damned giraffe. I apologize for the salty language. But the longer I stand here, the angrier I become."

There was Shaffer, back behind the keyboard as the night's musical director, and Alan Kalter once again serving as announcer. There was a Top Ten List — the differences between Letterman and Twain — during which "Late Night" favorite Chris Elliott appeared to declare that he was sound asleep backstage and doesn't "do jokes."

And there was Letterman's appearance at the end to receive the Twain bust.

Biff Henderson, his longtime stagehand and foil, appeared with his customary headset.

"Oh, hi, Biff, do you hear something?" Letterman asked.

"That's Mark Twain rolling over in his grave," Henderson said.

That led into a crisp, nearly 10-minute speech from Letterman, which opened with his praising each of the presenters ("Amy Schumer, future recipient of this award; John Mulaney, this is the future of comedy, ladies and gentlemen") before offering two more-serious messages.

"If you help someone, in any way, big or small, automatically you will feel good about yourself," Letterman said.

Then he offered a quote from Twain.

"Mark Twain's definition of patriotism is this," he said. "Patriotism is supporting your country all the time, and your government when it deserves it."

The Mark Twain Prize ceremony will air Nov. 20 on PBS.