This is honestly the happiest moment of the film.

Would you like to watch Toni Collette have a nervous breakdown for two hours? “Hereditary” is many things — a haunting story about a disintegrating family, a masterfully directed nightmare by first-timer Ari Aster, a pants-besoiling horror film — but it’s also Collette’s highlight reel, full of intense emotions and monologues that she performs with devastating perfection. This would be a very good movie with only a so-so actress in the lead, but Collette tips it into masterpiece territory. OK, Collette and whatever hell spawned Ari Aster’s imagination.

She plays Annie Graham, an artist who lives in a sprawling, modern-rustic house with her husband, Steve (Gabriel Byrne), high-school son Peter (Alex Wolff), and 13-year-old daughter Charlie (Milly Shapiro). At the outset, Annie’s secretive, controlling mother has just died, leaving behind no mourners (“Should I be sadder?” Annie wonders), except maybe for Charlie, who was Grandma’s favorite. Charlie’s an odd little girl, though whether this is the effect of her grandmother’s doting or the cause of it is not immediately clear.

Annie finds a book on spiritualism among her mother’s possessions, with a personal note (signed “Mommy”) assuring her that “our sacrifice will pale next to the rewards,” whatever that means. We are thus prepared for the story to take a supernatural turn, but on its way there, it takes a profoundly disturbing side trip through a more mundane kind of misery. A horrific event shatters the family (AND YOUR SOUL), and it’s a breathless, gripping 25 minutes before the aftermath is resolved and the story can continue. (This, by the way, is why the movie is longer than the usual horror flick. The Horrific Event must be properly addressed.)

Anything can happen after that. Many things do. True, it’s a slow-burn kind of film, with no jerky camera movements or unwarranted jump-scares. Aster often frames the rooms of the house so they look like Annie’s dioramas — which, by the way, are miniature depictions of scenes from her life, including ones you’d think she wouldn’t be eager to recreate, so there’s a whole other layer of creepiness — subtly suggesting that the Grahams are playthings in a dollhouse being controlled by outside forces. (Which, as fictional characters in a movie, they are.)

But don’t let “slow-burn” make you think “Hereditary” is dull or languid. While the cavernous house (complete with disused attic) and the book on spiritualism give you some indication of where the story is going, what makes the film so alarming is that it’s not just one kind of hell that’s threatening to break loose. As we learn more about Annie’s family history, and as the consequences of the Horrific Event unfold, we’re bombarded with numerous eerie possibilities. Sleepwalking! Parental regret! Seances! Family secrets! The emotional tension between certain characters is sometimes as nerve-racking as the more traditional scary-movie elements.

It’s not one specific thing we’re afraid of, either, nor does the film limit itself to one sense of the word “horror.” It has many good old-fashioned scares, sure (assisted by a crisp sound design and Colin Stetson’s disorienting score), but it also has events, images, and ideas that are horrifying without being meant to cause “fright,” per se. One kind of horror rattles your nerves for two hours, the other kind rattles them for days afterward.

Collette’s intensely committed performance is the anchor, but the others shine as well. Alex Wolff (“Jumanji: Welcome to the Jungle”), who’s great at looking stricken, conveys complicated emotions wordlessly in several key moments. Milly Shapiro, a girl with a distinct look who got her start playing Roald Dahl’s Matilda on Broadway, is perfectly cast as a misfit with sinister potential. Gabriel Byrne isn’t given as much to do — he only married into this family, after all — but he quietly provides stability. There’s also a noteworthy turn from Ann Dowd as a member of a grief support group who provides Annie with some solace.

With just a few short films under his belt (some of them also highly alarming), 31-year-old writer-director Ari Aster delivers his first feature with astonishing confidence, as if he’d been making stylishly effective heart-pounders for decades. At Sundance, he introduced a screening of “Hereditary” by saying he’d had “a rough few years” with his family. Whatever has happened in this guy’s life, he’s working through it by traumatizing audiences. One moment elicited an audience-wide “Gahh!” that was followed by stunned, disbelieving silence. I wish there’d been a camera to capture us all with our eyes wide, our mouths agape, our armrests broken. (It wasn’t just a shock-value moment, either, but a legitimate turn in the story.) There’s another image later that makes me shudder — an involuntary physical reaction — every time I think of it. If there’s a better horror movie this year, I’m going to need new pants.

Crooked Marquee

A (2 hrs., 7 min.; R, grisly images, intense horror sequences, nonsexual nudity, and some very justified profanity.)