Fear eats the soul in It Comes at Night, a dread-laden tale of apocalyptic American paranoia from Trey Edward Shults, writer/director of the startlingly revealing family drama Krisha (2015). Set in the wake of an unspecified plague-like outbreak, Shults’s second feature finds a family struggling to survive in a remote woodland home, isolated from the world and increasingly from one another. As with Stephen Fingleton’s similarly bleak The Survivalist, the story unfolds at the edges of a collapsed civilisation, with characters driven by distrust, desperation and a steely determination to protect what is theirs. Yet whatever fairytale terrors may lurk out there in the woods, it’s what comes from within that threatens to tear these people apart.

The film opens with the sound of breathing, of voices muffled by gas masks asking: “Can you hear me?” and insisting: “I love you, Dad, I do.” But in this dystopian world, we kill the ones we love – in this case an infected, ageing relative who is shot and then burnt in a shallow grave. “He shouldn’t have seen that,” says Sarah (Carmen Ejogo) of her 17-year-old son, Travis (Kelvin Harrison Jr), after the execution of his grandfather. It’s through Travis’s traumatised eyes that we will watch this world fall apart, sharing his dreams and nightmares as we follow him through the claustrophobic spaces of a home that is part fortress, part prison.

An anxiety about mankind’s tendency towards inhuman destruction underwrites the narrative

Joel Edgerton’s patriarch Paul rules this roost, in which the windows are boarded up and the only entrance is via a locked red door at the end of a sealed corridor. Family photos depict happier times in what looks like the recent past, but Shults is careful to keep the backstory vague and shadowy. Lamps and torches flicker in the gloomy interiors, tiny pools of illumination amid the darkness.

There are strict rules: always travel in pairs; eat meals together; never go out at night. When a stranger tries to break into their house (shades of the 2006 French-Romanian home invasion chiller Them/Ils), Paul is forced to consider joining forces with intruder Will (Christopher Abbott), offering shelter to him, his partner, Kim (Riley Keough), and their young son, Andrew. The arrangement brings food, livestock and friendship – valuable resources. But the newcomers’ presence also awakens desires in Travis that threaten to drive a wedge between him and his father (“You can’t trust anybody but family”), like a sleepwalker opening a door to the unknown...

Watch the trailer for It Comes at Night.

Along with overt nods to Romero’s Night of the Living Dead and Kubrick’s The Shining, Shults cites William Golding’s novel Lord of the Flies as an inspiration and incorporates hellish Bruegel paintings into Karen Murphy’s production designs. An anxiety about mankind’s tendency towards inhuman destruction underwrites the narrative, with this warring home becoming a microcosm of global catastrophe. A former teacher, Paul has studied the rise and fall of the Roman empire and seems condemned to watch history repeat itself on a worldwide stage.

Yet Shults’s focus is also intensely personal, refracted through the loss of Travis’s innocence. There are twisted hints of Lynch’s Blue Velvet and Wes Craven’s The People Under the Stairs as Travis listens in to intimate adult moments from the crawl spaces up in the attic, vicariously experiencing the life and love he so strongly craves. With such cravings comes guilt – nocturnal fantasies full of diseased bodily fluids and fatal attractions. As he dreams, the screen narrows almost imperceptibly, squeezing the top and bottom of cinematographer Drew Daniels’s widescreen frame like half-opened eyelids. And like Robert Eggers’s The Witch, which shares its atmosphere of dreamy damnation, It Comes at Night moves towards a devastating climax, which may be read as a fever dream. Or maybe not.

Driving these fantasias is a profoundly unsettling score by composer Brian McOmber, the former Dirty Projectors drummer whose oscillations lurk like a dormant virus before coming to the fore in horrific crescendos – thunderous, distorted and menacing. Layered modular synths, sinister strings and insistent percussion intertwine with the heightened ambient sound, evoking the experimental work of Krzysztof Penderecki and Toru Takemitsu.

“If you want me to be the bad guy, then I will,” says Paul, but there are no bad guys here – just suspicion, isolation and contagion. It’s a grim vision of a world losing track of objective facts, descending into a poisonous abyss of chaos and disorder. No wonder it strikes such a contemporary chord.