After Cheap Trick ended the regular portion of the Rock and Roll Hall of Fame induction ceremony with a fiery performance, the band stayed onstage to lend its firepower to the final jam session, which drew inductees, speech-givers and tribute performers alike back to the stage.

The group selection ended up being a cover of "Ain't That a Shame," the tune co-written by Fats Domino and Dave Bartholomew that famously appeared on Cheap Trick's At Budokan.

Paul Shaffer and E Street Band's Steven Van Zandt -- the latter of whom inducted Bert Berns, this year's Ahmet Ertegun honoree -- joined Steve Miller, and members of Chicago and Deep Purple for the performance.

The Chicago horns added a nice touch to the guitar-heavy sound, which featured vocalists cycling through different verses. Sheryl Crow and Grace Potter, who earlier honored Eagles' Glenn Frey with a touching performance of "New Kid In Town," contributed singing, as did David Coverdale and Glenn Hughes -- who both declined to be part of Deep Purple's performance earlier in the night.

Amusingly, Miller was already using the guitar Rick Nielsen had given him during Cheap Trick's acceptance speech: an axe featuring, appropriately, the Miller Beer logo. In a nod to his forebears, Miller played the guitar behind his head at one point during the jam.

Prior to the performance, while the bands were setting up, Nielsen played emcee and introduced many of the musicians on the stage. He also expressed regret that he didn't get a chance to do a song with N.W.A., who did not end up performing last night.

As expected, original Chicago singer Peter Cetera, who left in 1985, ended up being a no-show, although co-founding honoree Danny Seraphine, who left in 1990, performed with the band during its set -- something he was visibly emotional about doing.

Chicago, who had been eligible since 1994, earlier claimed victory in fan voting. Deep Purple, whose absence has long been pegged as one of the hall's most egregious errors, first became eligible for induction – like Miller – in 1993. Cheap Trick has been eligible since 2002.

All four original members of the beloved Rockford band were inducted. This included drummer Bun E. Carlos, whose in-limbo status with the group prompted a court battle.

N.W.A. rounded out the list of honorees at tonight's 31st annual Rock and Roll Hall of Fame induction ceremony, held at Barclays Center in Brooklyn, N.Y. The event will be broadcast by HBO on April 30.

Cheap Trick Albums Ranked Worst to Best

More From Ultimate Classic Rock