NEW YORK — Pearl Jam, Tupac Shakur, Joan Baez, Electric Light Orchestra, Journey and Yes were inducted into the Rock and Roll Hall of Fame on Friday night.

Nile Rodgers received a special honor at the event held at the Barclays Center in Brooklyn.

Presenters inducting the 2017 class included David Letterman, Snoop Dogg, Pharrell Williams, Dhani Harrison, Pat Monahan, Jackson Browne and Alex Lifeson of Rush.

To be eligible, all of the nominees had to have released their first recording no later than 1991. Inductees will eventually be enshrined in the Rock and Roll Hall of Fame museum in Cleveland.

Dogg, a former label mate and friend of Shakur, says he was at Friday night’s ceremony to make sure the rapper, actor and poet is remembered as a “strong black man that stood for his.”

Dogg, a marijuana enthusiast, also says it was Shakur who first gave him weed.

He said to laughs from the audience: “That’s right — Tupac got Snoop Dogg smoking blunts.”

Alicia Keys performed a medley of Shakur’s songs on piano, including “Dear Mama” and “Changes.” T.I. and Treach of Naughty by Nature also performed.

Shakur died in 1996.

Chuck Berry was the first artist inducted into the Rock and Roll Hall of Fame, and he was the first to be honored at the Hall’s 32nd annual ceremony.

Electric Light Orchestra honored Berry, who died last month, with an electrifying performance of “Roll Over Beethoven.”

Before that, a video played featuring past interviews with Bruce Springsteen, Paul McCartney, Keith Richards and others discussing Berry’s sound and style. Jann Wenner, whose speech opened the show, said of Berry, “no one would be in this room if it wasn’t for this man.”

Wenner also named each of the inductees and discussed their success, and the audience erupted loudly after he called out Pearl Jam. Most of the crowd stood on its feet and clapped for minutes, as the camera panned to Eddie Vedder.