If there was an unofficial slogan for the “Boston Strong: An Evening of Support and Celebration” benefit concert, it was wrapped up in the classic song “You’ve Got a Friend.”

When the song’s writer — Carole King — and the singer who helped make it famous — James Taylor — finished that song Thursday night at TD Garden, the longtime pals received one of the dozens of ovations that met the entire parade of performers during the five-hour plus concert to benefit the One Fund.

While there were moments of solemnity and reflection befitting an event meant to honor those injured and killed in the Boston Marathon bombings, the prevailing mood was one of jubilance and gratitude, of bedazzled Bruins jerseys and harmony vocals, of tears and giggles, and Steven Tyler’s still otherworldly scream on “Dream On.”

Artist after artist, from different eras and genres — from Aerosmith to Jason Aldean to Jimmy Buffett to the New Kids on the Block — came to literally sing the praises of Boston, its citizens, and the first responders and survivors of the attack, many of whom sat in a special section right in front of the stage. Sports stars like Tedy Bruschi, Doug Flutie, and Julian Edelman also came to pay their respects, and comedians Steven Wright, Dane Cook , Lenny Clarke, and Steve Sweeney supplied a wide range of laughs.

Get The Weekender in your inbox:

The Globe's top picks for what to see and do each weekend, in Boston and beyond.

The musicians did their part Thursday, playing a jukebox worth of hits, sitting in with one another, and pulling surprises out of their hats in a night marked by abundance of both homegrown talent and stars from elsewhere with deep affection for the city.

Boston got the ball rolling with the classic rock staple “More Than a Feeling,” adding a fun touch by scrawling the word “strong” under the Boston logo on their trusty gong. Extreme led a prom-night flashback singalong of “More Than Words.” The J. Geils Band revved up to full tilt party mode for tunes like “Freeze Frame.” Jason Aldean added a jolt of arena country polish with big beat hits like “Tattoos on this Town.” Taylor and King played a beautiful joint set before ceding the stage to the Parrothead high commander Jimmy Buffett.

And only an event like this would produce what is likely to be a once-in-a-lifetime collaboration: the New Kids on the Block helping the Dropkick Murphys perform the latter’s anthem “I’m Shipping Up to Boston.”

NKOTB were full of surprises, in addition to their own bubblegum jams like “Hangin’ Tough,” the quintet invited several friends to the stage. Bell Biv Devoe — featuring members of fellow Boston vocal group New Edition for those keeping score — dropped by to rock their hit “Poison,” and current NKOTB touring partners Boyz II Men popped up to sing their ballad “One Sweet Day.”

Aerosmith brought the show to a typically rocking conclusion with a string of classics including “Sweet Emotion” and “Walk This Way.” They were then joined by many of the participants — including NKOTB, Taylor, Buffett, and Peter Wolf among others — for spirited runs through the Beatles “Come Together” and the Standells “Dirty Water” to cap the night of camraderie.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.