Cheap Trick, Chicago, Deep Purple and Steve Miller were the other groups that entered the Rock Hall

Receive the latest entertainment-news updates in your inbox

Dr. Dre, from left, Ice Cube and MC Ren of N.W.A pose in the press room at the 31st Annual Rock and Roll Hall of Fame Induction Ceremony at the Barclays Center on Friday, April 8, 2016, in New York.

N.W.A. triumphantly entered the Rock and Roll Hall of Fame Friday, the groundbreaking quintet that brought the rough streets of Los Angeles into homes through their music defiantly refuting those who suggested rappers didn't belong in the institution.

They joined the rock hall in a ceremony at Brooklyn's Barclays Center with 1970s-era rock acts Cheap Trick, Chicago, Deep Purple and Steve Miller.

N.W.A.'s rough-hewn tales tilted the balance toward West Coast rap in the late 1980s on songs like "F--- the Police," ''Boyz-N-The Hood" and "Straight Outta Compton." Following the act's breakup, Dr. Dre became one of music's most in-demand producers and a billionaire with a high-tech headphone company. Ice Cube moves between music and a successful acting career.

For all the success, some traditional rockers have resisted the inclusion of rap acts into the hall, most prominent Kiss' Gene Simmons, whose band was inducted last year.

"Rock 'n' roll is not conforming to the people who came before you but creating your own path in music and in life," Ice Cube said. "That is rock 'n' roll and that is us."

Ice Cube turned to Dr. Dre, thanking him for letting him hang around and make music with him as a 15-year-year old boy. Then he caught himself: "Stay in school, kids, God damn it," he said to the audience's laughter.

Named for one of N.W.A.'s best-known songs, the movie "Straight Outta Compton" told the band's story and was one of the biggest box office winners of 2015.

They were inducted by one of music's hottest artists, Kendrick Lamar, who said N.W.A. members were heroes to kids like him growing up. They "proved to every kid in the ghetto that you could be successful and still have your voice while doing it."

The act announced just before the event that they would not perform at the rock hall event.

Chicago was known for a brassy, jazz-rock fusion in its early days and settled into a comfortable career penning pop hits. Among their favorites were "Saturday in the Park," ''25 or 6 to 4," ''If You Leave Me Now" and "Does Anyone Really Know What Time it Is?"

Metallica drummer Lars Ulrich described seeing the night's first inductees, Deep Purple, when he was nine years old and taken to their concert in Copenhagen. He said it changed his life.

"Almost without exception, every hard rock band of the last 40 years — including mine — traces its lineage back to Black Sabbath, Led Zeppelin and Deep Purple," Ulrich said. "They are always considered equal. In my heart, I am bewildered that they are so late in getting into the Rock and Roll Hall of Fame."

The band was without one of its founding members, guitarist Ritchie Blackmore, who stayed away because current members wouldn't agree to play with him. But the inductees regarded him warmly in their speeches and paid tribute musically — performing "Smoke on the Water" with the signature riff that the guitarist came up with.

Ulrich called it the guitar riff "that has actually been banned from playing in music stores to preserve the sanity of the staff."

Steve Miller and his band played his crowd-pleasing hits "Fly Like and Eagle," ''Rock 'n' Me Baby" and "The Joker" to an audience of fellow musicians and industry professionals sitting at tables at the Barclays Center and ticket-buying members of the public in the surrounding stands.

"If you listened to the radio, you listened to Steve Miller," said the Black Keys' Dan Auerbach, who inducted Miller with his partner Patrick Carney. He cited Miller's run of hits that also included "Jet Airliner" and "Jungle Love."

Miller stressed his blues roots in a speech, and showed off licks in the extended version of "Fly Like an Eagle." He thanked Les Paul, T Bone Walker, his parents and grandmother and a succession of band members. And the audience.

"Without you, nothing is possible and with your support, everything is possible," he said.

The pride of Rockford, Illinois, Cheap Trick's career soared in the late 1970s when a live album recorded before a gleeful Japanese audience added excitement to tracks like "Surrender" and "I Want You to Want Me." The band just released a new disc on the hot Big Machine label.

The hall also inducted songwriter and producer Bert Berns.

HBO is filming Friday's show and will air highlights on April 30.

The rock hall also announced that starting in 2018, it would begin alternating the annual induction ceremony between New York and Cleveland, where the Hall of Fame and Museum is located.