Talk about going out with a bang! Broadway’s ending its season with a sensational revival of “Pippin” — a thrilling piece of eye-popping razzle dazzle filled with daredevil acrobatics.

Stephen Schwartz and Roger O. Hirson’s unconventional 1972 musical does lend itself to experimentation. Set in a hippie-dippy version of the Middle Ages, it’s framed as a show within a show in which a merry band of street performers recounts a young man’s coming of age.

Diane Paulus, who helmed the winning revival of “Hair,” has preserved a lot of Bob Fosse’s original suggestive burlesque moves — the choreography here is credited to Chet Walker, working “in the style of Bob Fosse.” You have to wonder where the line between homage and rip-off lies, since every hand gesture, every hip swivel owes to the late master. But then, what lover of Broadway could complain about that?

More important, Paulus adds a whole new layer to the proceedings by taking to heart the title of the first song, “Magic To Do.”

The stage at the Music Box has been decked out to evoke a psychedelic big top, and the cast smoothly segues from singing to dancing to circus acts. The last, devised by Gypsy Snider, of the Canadian company Les 7 Doigts de la Main, includes aerial acrobatics, knife-throwing, juggling, sleight of hand, and feats of strength and balance.

In a gender-bending twist, Patina Miller (“Sister Act”) takes on the role of the Leading Player, the M.C.-like character created by Ben Vereen. She guides us through the adventures of Pippin (Matthew James Thomas), the good-hearted son of King Charlemagne. The ever-reliable Terrence Mann — looking like Donald Sutherland’s lost twin — plays the king as a blustery, petulant maniac whose favorite expression is “Denied!”

Our aimless young hero has a vague sense of dissatisfaction, reinforced by his high-strung stepmother, Fastrada (Charlotte d’Amboise). She wants her own son to take the throne, while Pippin dreams of finding his “Corner of the Sky.”

As his grandma Berthe (Andrea Martin) reminds him, “It’s time to start livin’/Time to take a little from this world we’re given.”

Good advice — but what makes it memorable is that Martin sings part of it upside down. She may as well start rehearsing her Tony speech now.

Despite the constant whirlwind of activity, we never lose track of the human element, embodied by the vivid contrast between Pippin and the Leading Player.

This ringmaster may provide guidance with “On the Right Track,” but she’s hardly kind — from her snake-hipped dancing to her snapping at the unruly members of her troupe, she has an ominous edge.

The brittle Miller has a fine foil in Thomas (a former Peter Parker in “Spider-Man: Turn Off the Dark”), whose character has a charming, non-cloying warmth. He also shares a lovely rapport with Rachel Bay Jones’ daffy Catherine, and gamely joins in the circus shenanigans.

In this more-is-more atmosphere, you’d expect Paulus to pull all the stops for the finale, but instead she surprises us yet again. And it works: Turns out that life without flashy tricks, away from the spotlight, can be pretty great.

By Elisabeth Vincentelli, New York Post