Jordan Peele’s new movie Us opens with a passage informing viewers that beneath our nation is a warren of abandoned tunnels, subway lines, service corridors, and mines.

Be it known, that for a horror connoisseur like Peele, a mine is a terrible thing to waste.

That pun dates to roughly 1986, when Us opens. A girl is with her folks at a Santa Cruz beach when she wanders off alone into an amusement park, and we fear the worst — not least because she’s wearing a Michael Jackson T-shirt. Remember, this is Jordan Peele, not Norman Vincent Peale.

Anyway, she ends up in a hall of mirrors, and her encounter with a distorted version of herself (Peele keeps it off camera, and up to the viewer’s imagination) leaves her wide-eyed, traumatized.

Cut to 30 years later, when the girl is now a thirtysomething woman named Adelaide (Lupita Nyong’o) with a family of her own — a shy boy (Evan Alex), a tween girl (Shahadi Wright Joseph) and a goofy husband named Gabe (Winston Duke), who suggests the family take a quick trip to … Santa Cruz.

She resists and relents, but is ill at ease the entire day. On the sand, she watches her children like a hawk, beset by a chronic sense of dread that Peele wants us to share. The camera angles, the music, the references to Jaws, all feed our sense of disquiet.

As is his way, Peele changes pace with comedy. Adelaide makes small talk with her catty friend Kitty (Elisabeth Moss), who’s at the beach with her yuppie husband (Temple alum Tim Heidecker). Kitty is on her third glass of wine, and looking forward to “vodka o’clock.” She is in danger of descending into what Peele might call The Drunken Place.

It’s too much for Adelaide, who takes her family home early. At night she tucks them into to bed, but she can’t shake her gnawing fear and abruptly demands the family leave immediately.

Too late. Her son wanders in to the room to announce that there’s “a family in our driveway,” and there is. A mirror-image family of grunting, murderous doppelgangers — setting the stage for a home invasion drama that grows broader in scope and theme, and much, much bloodier.

Us, next to Peele’s directorial debut Get Out, can be more comfortably tucked into the horror genre, but it’s just as ambitious, and eager to function as social commentary. The doppelgangers don’t say much, but when they do — “We’re Americans” — we’re encouraged to think about who and what these usurpers (ignored, mistreated, aggrieved) represent. What is there connection to “us," and why do they come with scissors?

Peele also packs the movie with so many references the head spins. The shout-outs to Spielberg and Lewis Carroll are evident. Less obvious and more unsettling is what appears to be a nod to Michael Haneke’s excruciating Funny Games, a movie that took barely disguised pleasure in the torture of wealthy characters.

There is a hint of that in Us. It’s not enough someone gets their throat slit. There must be gurgling. This coexists awkwardly with Peele’s periodic stabs at macabre humor. I think it was the fourth or fifth mangled woman that had me looking forward to closing credits. (As this is both a doppelganger movie and a bogeyman movie, there is a multiplier effect, by my count one actress had three death scenes).

Having said that, the movie is an effective showcase for Oscar winner Nyong’o, whose doppelganger inverse is allowed to develop as a character, giving the actress a chance to cover a great deal of ground (sometimes literally).

She has a decisive role to play in the film’s finale, which shows another influence — M. Night Shyamalan. Peele shares his knack for cramming the screen with details that can be decoded on repeat viewings, and he favors perspective-shifting endings.

What Peele conjures here in the final moments is clever enough to remind us that he was telling an intricate story all along, and not just piling up bodies.

Us. Directed by Jordan Peele. With Lupita Nyong’o, Winston Duke, Elisabeth Moss. Tim Heidecker, Anna Diop and Yahya Abdul Mateen II. Distributed by Universal Pictures.

Running time: 116 minutes

Parents’ guide: R (violence)

Playing at: Area theaters.