From the moment we open the door into “It Comes at Night,” it’s clear this isn’t going to be a standard horror film.

Look at this man. He’s maybe 60 years old. His eyes tell us he’s conscious of his humanity and who he used to be — but he’s also aware of the terrible, irreversible fate awaiting him because he’s been turned into … something.

We don’t know who he is, but we know the people in gas masks surrounding him care about him (or at least about the man he used to be), and we understand they’re going to have to put him down, lest the virus that infected him spread to them as well.

And we know that’s going to break their hearts.

“It Comes at Night” is all about the choices made by good people in the midst of an apocalypse, and how even the best intentions can lead to tragedy.

The chameleon actor Joel Edgerton (“The Gift,” “Midnight Special”) has an uncanny ability to play outwardly likable everymen we can’t entirely trust. That’s certainly the case with the patriarch he plays in this film. We want to like this guy, but what’s he really up to?

In “It Comes at Night,” Edgerton is Paul, a former history teacher turned survivalist living with his wife Sarah (Carmen Ejogo) and their teenage son Travis (Kelvin Harrison Jr.) in their heavily secured home in the woods.

SOMETHING terrible has happened out there. We don’t know exactly what it is, but we do know it’s so lethal and so pervasive, Paul and his family never leave the house without wearing gas masks, and they treat any visitors who knock on their door as threats.

During the day, Paul, Sarah, Travis and their faithful dog Stanley head out to gather food and firewood, and to check the perimeter. At night, they turn out the lights, they double-lock the doors, they keep quiet and they brace themselves for the coming storm. Anyone and anything approaching the house is to be killed.

Still, after some serious drama and much debate, they make the decision to welcome Will (Christopher Abbott), his wife Kim (Riley Keough) and their toddler son Andrew (Griffin Robert Faulkner) into their home.

Everyone settles in for an extended family dynamic that creates some wonderful, if fleeting, moments of trust.

But then the night comes.

The superb cast does a wonderful job of keeping us guessing as to everyone’s motives. Travis is such a likable kid, but his eavesdropping on the guests, and his teenage lust for Kim, is off-putting. Will seems like a great guy who is extremely grateful for Paul’s hospitality — until a glitch in Will’s backstory has Paul (and us) wondering about Will.

That’s when “It Comes at Night” is most effective — when we’re trying to figure out these characters and what exactly is creating those weird noises and jolting thumps beyond the locked doors.

On the downside, writer-director Trey Edward Shults indulges in too many “It was only a dream” sequences that are clearly “It was only a dream” sequences from the get-go, which actually serves to lessen the tension. And sometimes a bump in the night is just a bump in the night.

But not always. And that’s what gives “It Comes at Night” some real impact.

★★★

A24 presents a film written and directed by Trey Edward Shults. Rated R (for violence, disturbing images, and language). Running time: 95 minutes. Opens Friday at local theaters.