Oh, sure, “Insidious” gets a little hokey. It leans on the jump scares more often than it should. Dialogue is not its strong suit. Some of the details, rather than contributing to a cohesive whole, are simply random. I will grant you all of this.

But I will also grant you the chills — actual, literal chills — that I felt at a few of the creepier moments, and the general sense of terror and unease that permeates most of the movie. Whatever flaws it may have, “Insidious” scared the hell out of me.

It was written by Leigh Whannell and directed by James Wan, who previously collaborated on “Saw” and one of its sequels, though I don’t feel like that’s a selling point. People who despised those movies (or refused to see them based on descriptions of their content) would find that “Insidious” is a different animal altogether. There’s no torture or gore here, just good old-fashioned nightmares!

Suburban couple Josh (Patrick Wilson) and Renai (Rose Byrne) have just moved, with their three young children, into a charming old house that would seem to be a perfect fit except that it has a drafty attic infested with sound effects. (That’s the sort of thing you really ought to catch during the walk-through. “We love the house, but we’re concerned about the creepy sound effects. Have you called anyone about that?”) Josh is a loving and faithful husband, but somewhat oblivious about his tendency to leave the unpacking and child-rearing to Renai, who’s frazzled.

Contributing to Renai’s befrazzlement — or perhaps manifesting because of it? — is a series of events belonging to the category of Creepy Weird Stuff That Happens in Old Houses in Movies. Most of this is standard: doors that swing shut, mysterious creaking, unexplained sounds picked up by the baby monitor, glimpses of ghostly images. Wan isn’t the first pianist to play this tune, of course, but he pounds it out well enough.

Much of this eeriness is subjective, possibly hallucinatory. There’s no disputing the other unusual event, though, which is that Josh and Renai’s son Dalton (Ty Simpkins) falls into a coma and cannot be awakened. Whether this is connected to the other incidents is for you to find out. (Or you could just guess. You’d probably be right.) Josh’s mother (Barbara Hershey) worries about her grandchildren, and a friend of hers, Elise (Lin Shaye, intensely committed), arrives to offer assistance.

From there … well, let’s just say things get worse for this family before they get better. Part of the fun is not knowing what type of scariness we’re dealing with here, whether it’s supernatural, human-caused, imaginary, or something else altogether. There’s an admirably chaotic seance sequence that’s about five different kinds of terrifying.

Whannell’s screenplay does indulge in a few gimmicks that are creepy but meaningless in the bigger picture. That isn’t as satisfying as a film where all the details prove relevant in the end, where the answer to “Why did so-and-so do such-and-such?” isn’t just “Because it looked spooky.” Then again, it’s hard to argue details when your eyes are bugged out and you’re clutching the armrest of your chair.

B+ (1 hr., 41 min.; PG-13, moderate profanity, one F-word, brief violent images, a lot of intensity and scariness.)