A dark yet festive mood is established from the first moment of “Bullets over Broadway,” as a lone actor in gangster garb fires gunshots to light up one letter at a time of the show’s name, spelled out in old-time theatrical bulbs.

The production, paradoxical by nature (Woody Allen writing a musical?), moves forward with a show-within-a-show plot populated by stock characters (the floozy who wants to be a star, the gangster who loves her, the narcissistic aging diva, the struggling playwright, the loyal small-town girl).

Most of the music consists of Roaring ’20s hits, bound more or less believably to the plot, and most of the humor is broad or predictably angst-ridden, in standard Allen style. Its theme – the importance of art versus individual human lives – is of only mild interest, but it takes an amusing turn toward the end.

The spectacular part of “Bullets,” on stage at Ogunquit Playhouse until July 29, is the dancing. Ogunquit’s production is directed by Jeff Whiting, who worked closely with Susan Stroman on the Broadway show, and the choreography is tight and delicious, made even better by William Ivey Long’s stunning original Broadway costuming.

The women’s chorus weaves through the show, from kitty-costumed nightclub chorus girls in the opening number, “Tiger Rag,” to dancing bellhops as the players travel by train to Boston, to the artistic coup of silver-clad dancers posing as architectural features in the on-stage stage.

Period moves, such as Charleston steps, fan kicks and barrel rolls, are integrated with classic jazz and tap into a slick and timeless whole, brilliantly executed by the dancers.

The men get the most dramatic dance number in “Tain’t Nobody’s Biz-ness If I Do,” helmed by Reed Campbell. Campbell is wonderfully furtive and enigmatic as bodyguard Cheech, tasked with watching over gangster boss Nick Valenti’s girlfriend, Olive, during rehearsals.

When Campbell breaks into song, his voice deep, gruff and rich, it takes the audience by surprise. And his posse of dancing gangsters brings down the house with hard-hitting tapping and gorgeously masculine leaps and turns.

Headlining the production are Vincent Pastore (of “The Sopranos” fame), who originated the role of Valenti on Broadway, and Sally Struthers, whose annual appearances are a highlight of every Ogunquit season. Pastore plays Valenti perfectly, without a miss in his accent or demeanor.

Struthers plays supporting actress Eden Brent, a role that seems strangely underdeveloped. But Eden gets the unique Struthers stamp as she belts out her one good singing opportunity in “There’s a New Day Comin’,” and coos to her dog Mr. Woofles (provided by famed stage trainer William Berloni).

Another “Bullets” veteran (of the touring production), Jemma Jane, plays Olive for all she’s worth. Her over-the-top accent never falters, and she articulates hilarious asides brilliantly – for example, as her hip-thrusting “The Hot Dog Song” approaches its salacious climax, she offers to explain the “double entender” to repressed playwright David Shayne (John Rochette), in case she’s “being too subtle.”

Bridget Elise Yingling, as David’s girlfriend Ellen, and Michele Ragusa, as Broadway star Helen Sinclair, both impress with soaring vocals, especially in Yingling’s “I’ve Found a New Baby” and Ragusa’s “I Ain’t Gonna Play No Second Fiddle.”

Ragusa, in the role that won Dianne Wiest an Oscar in the film version, does a great job of portraying Helen as ego-driven without reverting to total caricature. Her introduction is one of the show’s slam-dunks; as David asks his agent, Julian Marx (Kenny Morris), “How big can her ego be,” she is revealed in a clinging robe dripping with silver in front of oversized velvet curtains, where she begins to sing “They Go Wild, Simply Wild, Over Me.”

The orchestra, under direction of Robbie Cowan, delivers excellent renditions of the show’s classic songs. At the press opening on Friday evening, there seemed to be some balance issues to work out in the sound system, when words of songs were lost or louder, higher notes came out brassy and glaring. The instrumental quality, though, remained fabulous throughout.

Correction: This story was updated at 1:49 p.m. on July 12, 2017 to correct Jemma Jane’s name.

Jennifer Brewer of Saco is a freelance writer, teacher, musician and dancer.