Weaving together horrific events of 1967 and potentially tragic ones of 2007, “Ghost Brothers of Darkland County” is a dark and stormy thriller. Themes of lust, revenge, love and regret run rampant through the musical.

“Ghost Brothers” was written by Maine’s prince of horror, Stephen King, with music and lyrics by John Mellencamp and musical direction by Grammy-winner T Bone Burnett. It came through Portland Thursday night with a talented ensemble cast of actors and musicians, met by a sold-out crowd at Merrill Auditorium.

It’s a tale about two sets of brothers. One pair is long deceased, though still around in spectral form, and the other is in the throes of flesh-and-blood conflicts. At the eye of the storm is Joe McCandless (Billy Burke), who is wrestling with 40-year-old demons as he gathers his family, including his troubled sons, at their summer cabin in Lake Belle Reve, Mississippi, and prepares to unload the secrets of his past.

The story is southern gothic, with the kind of twists only King could come up with, although some tightening up may help the show’s cohesiveness. There were a few moments of confusion with many characters on stage, but it all ultimately came together.

The Shape, masterfully portrayed by Jake La Botz, is either the devil himself or one of his chief advisers and plays the role of instigator and troublemaker. Clad in a leather vest and heavily tattooed, he offered up the funniest lines of the show while also playing guitar and singing.

The music of “Ghost Brothers” is roots-soaked country, folk and rock, and it was the strongest part of the show.

There was a swampy, dark feeling to many of the tunes, with songs such as “Wrong, Wrong, Wrong About Me” and “So Goddamn Smart.” The band was sensational and with good reason; they’re all from Mellencamp’s band. Andy York was on guitars and vocals, Jon E. Gee played upright bass, Troye Kinnett was on keyboards and harmonica, and Dane Clark was on percussion. First-rate all the way.

Another musical shining star was Jesse Lenat. His Zydeco Cowboy was the show’s narrator, and he played guitar throughout. And there’s more. Carlene Carter, daughter of June Carter and Carl Smith, played the minor role of Angie. She took lead vocals on a few lines here and there and was so good that it seemed a shame she wasn’t used more. Eric Moore, who portrayed Dan Coker, also stole the show a few times with his powerhouse voice.

Two other cast members with fantastic voices were Kylie Brown as Anna Wicklow and, in particular, Kate Ferber as Jenna Farrell.

The show boasted another big name. Gina Gershon (“Killer Joe,” “Face/Off,” “How to Make It in America”) portrayed Joe’s wife, Monique. She’s an alcoholic firestorm but likable because of her devotion to her family and her no-nonsense way of dealing with family strife. Gershon also held her own vocally with “Monique’s Song” and “On Belle Reve Time.”

One facet that deserves attention is the work of the three sound effects performers. They were part of the entire show, stationed on a small platform off to the side. They were costumed and part of the vocal ensemble. But they also used assorted household items, hand instruments and odds and ends to give the production the added feel of an old radio show.

Just before the curtain rose, there was a rumbling of applause in the audience as Mellencamp made his way to his seat. He signed a few posters and shook a few hands. He said he joined the audience because the show’s creators are “still making changes.”

This is good news, because “Ghost Brothers” has huge potential. The cast and the songs are strong, but the storytelling needs a few tweaks, one being not having all of the characters on stage the entire time, as it was tricky at some points to keep track of what was happening. The ending is over the top, but certainly not out of the realm of what would be expected of King.

The line between life and death is a complicated one, and “Ghost Brothers” walked it well.