Writer-director Robert Eggers has acknowledged that his first feature was inspired by “The Shining,” and like Stanley Kubrick’s film, “The Witch” is a study in paranoia that creates a deepening mood of unease and dread. In this case, however, the paranoia is religiously motivated and situated within a period context. And if the student doesn’t equal the teacher, his effort—despite a few stumbles (most notably a miscalculated final scene)—is genuinely creepy.

The film begins at a Puritan plantation in seventeenth-century New England, where William (Ralph Ineson), a farmer who has disturbed his neighbors with unspecified heterodox beliefs, is exiled from the community when he refuses to recant. He leads his family—wife Katherine (Kate Dickie), elder daughter Thomasin (Anya Taylor-Joy), adolescent son Caleb (Harvey Scrimshaw), and twin urchins Jonas (Lucas Dawson) and Mercy (Ellie Grainger)—further out into the wilderness, where they build an isolated homestead on the edge of the sort of dark, ominous forest that in folk tales is a always a source of evil that might threatens the world beyond. Soon the family has another member, infant Samuel.

The evil lurking in the forest strikes when Samuel is snatched away while in Thomasin’s care. The child’s abrupt disappearance is mysterious and inexplicable, and it’s suggested either that he might have served as the victim in some sort of Satanic ritual or that the rest of the family at least harbors fears that such might have been his fate. The loss throws Katherine into a paroxysm of grief and recrimination against Thomasin, whom she blames for Samuel’s kidnapping—and accuses of stealing a valuable silver cup. Matters deteriorate further when Mercy and Jason, who have developed an odd attachment to the family’s sinisterly rambunctious goat Black Philip, come to believe that their sister is a witch responsible for the child’s abduction. The pious Caleb, meanwhile, struggles to meet his father’s high expectations while resisting the temptation to peer too intently at Thomasin’s barely-exposed breast.

He also decides—unwisely, as it happens—to attempt to rectify the situation by venturing out into the forest on his own, carrying the rifle William has proven inept at using, to find Samuel, or at least some food for the increasingly desperate family. After an encounter with a red-caped witch—perhaps another hallucination—he returns home naked and maddened, soon falling into a deep sleep. The accusations against Thomasin mount, and the other family members all descend further and further into a mixture of fear, righteous indignation and emotional paralysis. Eventually Black Philip intervenes, though whether the animal is in fact an emissary of the devil or merely a symbol of the hysteria that’s consuming the family remains ambiguous.

It’s that ambiguity, in fact—along with the film’s ultimately failure to provide conventional shocks—that will probably disappoint the mass audience toward whom “The Witch” is being marketed. Everything that’s depicted by Eggers as paranormal can just as easily be interpreted as hallucinatory, with the final sequence in particular more likely to elicit laughs than screams or shudders. This is essentially an art film comparable, in terms of its approach and impact, to Michael Haneke’s similarly elusive “The White Ribbon,” and suggesting otherwise is almost a recipe for disaster.

If taken on the proper terms, however, Eggers’ film is quite effective. The performances are all excellent. Ineson, looking a tad like Richard Harris, superbly conveys a flawed man desperately trying to maintain a semblance of stability as his certainties collapse around him, and Taylor-Joy convinces as a girl feeling the pangs of youthful exuberance straitjacketed by her parents’ sternness. Scrimshaw similarly captures the struggles of a boy caught between religious devotion and the desires of the flesh, while Dickie shows the pain of a conflicted woman who, despite a rigorous surface, is as uncertain as her husband. Dawson and Grainger make Jason and Mercy mischievous and vaguely malicious. Even Black Philip plays his part effectively.

All of them are aided by the exquisite care with which the film has been assembled. Eggers and cinematographer Jarin Blaschke exhibit a painterly eye for composition, and editor Louise Ford maintains a steady, unhurried pace italicizing the poetry of the images. The sense of period detail in Craig Lathrop’s production design, Andrea Kristof’s art direction, Mary Kirkland’s set decoration and Linda Muir’s costume design is unerring, and kudos are due the sound team (Rob Turi, Adam Stein, Orest Sushko and Chris Guglick), whose work, along with Mark Korven’s score, fashions an appropriately unsettling ambience. The visual effects supervised by Geoff D.E. Scott—especially those in the final scene—are hardly of cutting-edge quality, but perhaps the message is that they’re not meant to be.

This is not a “Witch” of the Blair variety. Brooding and enigmatic, it’s hardly likely to appeal to aficionados of today’s typically visceral, blood-splattered horror movies. It succeeds, however, in creating an atmosphere of quiet, subdued menace in telling what the subtitle calls a “Folktale” about how religious belief can bring something other than salvation.