Mike Flanagan’s pre-Halloween horror release has to be complimented on two grounds. First, it’s superior to its predecessor, and a sequel that’s better than the first movie is very rare in the horror genre. Second, it’s not simply a grubby slice-and-dice formula slasher affair, opting instead for a classier look and a real plot.

Unfortunately, it’s that very plot—or rather the convolutions in its later stages—that get the movie into trouble. It starts out promisingly enough. In 1967, Alice Zander (Elizabeth Reaser), a recently-widowed mother of two—rebellious teen Lina (Annalise Basso) and sweet little Doris (Lulu Wilson)—tries to make ends meet by running a séance business (though how she hopes to do that is unclear, since her main goal is consoling her customers and she doesn’t seem to accept payment). Her daughters help her with the spooky effects, but they continue to grieve the loss of their father in a car crash.

On an outing with friends, Lina is introduced to the then-popular Ouija board game (one of the best touches in Patricio M. Farrell’s period-conscious production design is that the game’s cover announces that it was made by William Fuld’s Baltimore company, which was in fact the major producer at the time), and Alice decides to incorporate it into their “act.” But there’s an unexpected side effect: Doris uses it to communicate with a spirit she believes to be her dead dad—who saves the family home by revealing a cache of money hidden in the basement by a previous owner.

Of course, the ghostly interlocutor isn’t the departed Mr. Zander, but a malignant being that occasionally appears as a figure wearing what looks like a wetsuit with a mask featuring a pronounced nose. When Doris begins writing long passages in Polish, the suspicious Lina consults the principal at the Catholic school both girls attend, the solicitous Fr. Tom (Henry Thomas), who happens to be a widower who was a late-in-life entrant to the priesthood.

And this is where “Ouija: Origin of Evil” tries to get clever, and crumbles. The priest connects the spirit that penned the Polish pages through Doris with a Josef Mengele-type doctor who escaped Europe after the war and settled—you guessed it—in the house now occupied by the Zanders. Not only that: he continued his experiments in America, and what lies behind the walls of the basement is not just the cache of bills Doris found, but remnants of his unholy work—as well, it seems, as the restive souls of those who were his victims.

The problem with this last third of the picture is not simply that, like all too many movies nowadays, it uses the Holocaust as a convenient narrative crutch, a short of crass shorthand. It’s that the introduction of the “evil doctor” back story leads to the transformation of the screenplay into a jerry-built contraption. Suddenly demonic possession enters the story, together with a plot thread involving hideous screams and sewing up lips to silence them. A sudden hanging might serve as an effective gotcha moment, but it pales by comparison to a monologue about strangling that had occurred earlier, especially creepy in that it came from the mouth of an angelic-looking child. As so often happens in today’s horror films, any semblance of internal coherence is tossed out the window in a quest for easy scares and shocks.

That’s too bad, because for its first hour or so, “Origin of Evil” has the makings of a superior creepshow. The performances are far better than those one usually encounters in such fare, Flanagan’s direction shows the sort of flair that Joe Dante exhibited in his best work (he previously helmed two films worth checking out, “Absentia” and “Oculus”), and the overall look of the picture—with Farrell’s design abetted by nifty allusions to sixties culture (like television reports on the space program) and slick cinematography by Michael Fimognari—is striking.

In the end, though, the unsavory plot permutations of the final reel undercut the promise of the earlier ones. And a post-credits sequence tying the film to its predecessor doesn’t help matters. Though a cut above the usual horror fare, this is a step down from Flanagan’s previous film, “Oculus.”