In a word, atmospherics. Theater director Donna Swift knew she had to hold her junior high school players’ attention, and keep it held. But how?

Scour the old books and find the most Gothic fairy tale possible and bring it to life.

“I had to search long and hard to find the story of Bluebeard, the dark prince who married young ladies to make scary portraits of them before cutting off their heads,” she said, adding with a chuckle, “Don’t know why any publisher would want to keep a tale like that from our kids.”

Much as we try to protect our younger children from sinister material, by the time they reach junior high school they can’t get enough of it. Even little kids seem to crave it. How else to explain the tiny tot witches, ghosts and zombie costumes of Halloween or even the thrill of Halloween itself?

In the Edgartown gym turned auditorium last weekend, the house lights dimmed and the theater awoke in a deep moonlight. Shadows fell on the backstreets of an older America, like the twisted streets of forgotten London. A fog machine rolled out plumes of silver mist.

Characters appeared on stage, figures in top hats and leather breeches. Then, one by one in the upper shadows, seven virgin brides emerged, dressed in long white gowns, their faces masks of rigor mortis.

“Bluebeard . . . Bluebeard,” they chanted in a combination of memory, desire, and fear.

Ms. Swift said that she searched for such ghastly material in hopes that deeper moral lessons would seep through the entertainment.

Even the ostensibly cozy moments were stocked with foreboding. At home in their humble cottage, Mother (Amadine Muniz), dressed in Victorian widow’s weeds, lectured her two girls, Mary Elizabeth (Sara Poggi) and Mary Stephanie (Alley Ellis), as mothers have done from time immemorial, about marrying a man with money (as opposed to their penurious dad, the pig farmer).

“Marry for money for money is nice,” sang the determined mom.

But where can they find such a man? Their small town is absent of anyone with financial means.

Cue a knock on the door where a scary creature now stood, Bluebeard’s Assistant (Samantha Cassidy). “The prince would like to invite you to his ball tonight,” she announced in a hushed, commanding tone.

Through two complete acts, the atmospherics helped propel the action. Ms. Swift, aided by musical director Kelly Sullivan, collaborator Ross Hihalko on book, with music by Brian Weiland, put together a stage equivalent of The Rocky Horror Picture Show, led by star-struck lovers, Mary Elizabeth and townie jack-of-all-trades, Henri, played with winsome comic overtones by Thomas Weston. Ethan Donovan made for a slim, enigmatic Bluebeard.

Island Community Chorus director, Peter Boak, who attended the show this past Saturday, had this to say about the production, “The music was challenging yet accessible for the kids. There was a nice balance between music and action.”

The sense of urgency only intensified when the three ladies arrived at the castle. The stone-walled sets, with dark nooks and crannies and circling stairways, evoked Dracula’s castle. The organ chords, the menacing assistant, the ghostly gliding of the seven dead brides, and even occasional mishaps from the fog machine continued to ratchet up the sense of unease.

The daughter who had been hastily wed to the horrible Bluebeard soon discovered his secret dungeon of slain brides. On the wall hung their seven portraits detailing each one’s last moment of terror. The past brides came to life then, lining up to sing and dance the story of their travails in a show-stopping chorus line, complete with individual standout songs of greed, innocence and the harsh penalty that followed.

During the number the lights dimmed completely and the phantoms’ faces changed to orange orbs of sparkling terror. Student Alley Ellis choreographed this electrifying musical moment.

Ancient fairy tales are always held aloft by a moral, never marry for money in this case, but in Bluebeard, the spooky musical, this lesson did not get in the way of a good old scare fest.

Because atmospherics helped propel the show, special notice goes to set design and scenic painting, Alison Carr; production assistant, Della Burke; sound design, William Fligor; lights, Jared Livingston; spotlight, Ian Shea; makeup, Della Burke and Allison Carr; and hair, Lucia Hayman.

This junior high school production of Bluebeard was also better costumed than anything this reviewer has seen on the professional stage. Ms. Swift put time and effort into procuring the hoop skirts and the bridal gowns on e-Bay:

She’ll have them in stock for any subsequent productions, perhaps at the other Island schools where she teaches theatre arts. She’d also love to mount a production with grownup actors. Now there’s a good idea.