The music of Queen was surely destined to be the soundtrack of a musical.

Campy, flamboyant, tuneful and abundantly creative, the British hard-rock band led by singer Freddie Mercury formed in the early ’70s and recorded one of the decade’s rock masterpieces, the 1976 album “A Night at the Opera,” and its signature song, “Bohemian Rhapsody” — as well as more than two dozen other hits before Mercury’s death in 1991.

“We Will Rock You,” a crowd-pleasing musical that has sold more than 15 million tickets worldwide since its debut in London in 2002, opened Tuesday for a six-day run at The 5th Avenue Theatre. The high-spirited, 2½-hour musical (with live band, video and elaborate sets) includes more than two dozen Queen songs, from “Radio Ga Ga” to “Bohemian Rhapsody.”

While a Queen-inspired musical comedy that includes such offbeat characters as Galileo, Scaramouche and the Killer Queen may seem far-fetched, the storyline about a futuristic police state where rock ’n’ roll has been banned provides a lighthearted vehicle for Queen’s memorable tunes.

Save 75% on a Digital Subscription Today

Created by British writer, director and comedian Ben Elton, with musical supervision from Queen guitarist Brian May and drummer Roger Taylor, the updated production features a memorable cast, in particular Jacqueline B. Arnold as the overbearing Killer Queen, Brian Justin Crum as the dreamer-hero Galileo and Ryan Knowles as an unsinkable, wisecracking hippie named Buddy.

But the real star is Ruby Lewis as Scaramouche, the punkish heroine whose commanding vocals are a highlight. Her rebellious charm brightens the entire production.

Scaramouche and Galileo become part of a ragtag band of renegades called Bohemians, who occupy the ruins of a crumbling Hard Rock Café. Their fascination with the ancient musical style known as rock ’n’ roll is based on a few mysterious artifacts.

But their quest for the Holy Grail of rock ’n’ roll — an electric guitar — takes them to the ruins of Elvis Presley’s Graceland, a shrine to a forgotten era.

In the end, the Bohemians find salvation in their rediscovery of rock ’n’ roll and the overthrow of their oppressors. It’s as if “We Are the Champions” were written for them.

Gene Stout: