When we think about home invasion in movies, we usually have a concrete scenario in mind. A menacing figure who enters, either by force or friendly persuasion, and delivers orders and direct threats, cool-headed and precise. Weapon in hand. Objective in mind. Governed by a clear-cut timeline.

Babak Anvari's Under the Shadow is, for all intents and purposes, one such home-invasion thriller. It more or less fills the prerequisites. Except, as far as the film's protagonist is concerned, the presumed intruder doesn't even exist. It's nothing more than a frivolous myth passed between whispering children - or superstitious adults. Besides, Shideh (Narges Rashidi) has more important things to deal with - more tangible dangers, like the bombs outside that seem to be getting closer with every strike, or the neighbors fleeing the apartment building in droves, or the pressure from her out-of-town husband to leave their home and take refuge with in-laws. There's just no time to deal with her daughter's imaginary ramblings.

What she wouldn't give for that to be true. What she wouldn't give, for that matter, for it to be something as simple as an intruder. What she has on her hands instead, she slowly comes to realize, is an insidious force that has attached itself to young Dorsa (Avin Manshadi), its grip tightening around her with every moment.

At least with an intruder, you can communicate with it - you can try to negotiate; try to get through; even try to comply, as much as possible. Handling someone who has only material gain in mind is easy. But when the motive boils down to simple malice - with the stakes no less than your child's soul - the threat is suddenly non-negotiable, the circumstances much more perilous, bordering on hopeless. It's the kind of threat you feel with all your senses but can rarely, if ever, locate.

Under the Shadow is built on those intangible sensations - of doom, of imminent loss - as Anvari simply but effectively shapes an atmosphere of primal danger, the film itself becoming something of a state of mind. The director plays with perspective with a lot of his visual choices - through small details in many cases, but more overtly in others, namely a hallucinatory sequence that begins with Shideh lying in bed, the camera tilted 90 degrees before tilting back in near-perfect coordination with her body as she sits up straight. At this point in the story, she still has yet to accept that she and her daughter are coexisting with any sort of supernatural presence - despite murmurs of the presence of djinn, from both Dorsa and various neighbors. It takes visual confirmation, evasive as it might be, before she finally comes around - the spectral figure appearing as a floating chador that never stays in sight for very long, always darting away in almost mockingly playful fashion, the sardonic pursuer in a game of existential cat and mouse.

You can understand why it might be getting confident - arrogant, even. What limited safety and protection Shideh was offered by the world around her has been gradually whittled away. She began the film with her autonomy already under perpetual threat - both from the oppressive regime that forbids her to continue her medical-school education, and the husband, Iraj (Bobby Naderi), who doesn't entirely respect her wish to do so. Then Iraj is called away for military duty, leaving her alone in the middle of a war with a daughter to protect - and, now, an unexpected, uninvited guest to contend with. Try as she might to not let it in (whatever it is), she has only so many fingers and far too many leaks to plug. It was bound to get in; only a matter of time. The X's Shideh keeps taped to the windows are a cruel joke turned on her. As if, it might say, I need a window to get in.

No, the doorways that dominate the film's compositions do just fine. Anvari visually allows this malevolent phantom to take up residence, persistently focusing his eye on the open doors and doorways, through and within which he stages much of his action - scenes of conflict, of conversation, of revelation. The corridors that connect those doorways - perpetual frames within the frame - take on a pregnant sense of malice; as Anvari's camera follows Dorsa (in particular), he holds his shots long enough to let air flow freely through those open spaces, like an underscore materializing where a word should naturally be.

As the physical space opens up more and more for their visitor, Shideh and Dorsa's world gets smaller, more constricted, more delicate. An un-detonated missile has lodged itself through the roof of the building, piercing the living space of a neighboring family. Shideh's own ceiling is threatening to collapse in on her at any second. And the bombs outside keep getting louder. Whether home or homeland - in this case, both - her tenuous zone of personal security has been punctured, the air inexorably leaking out of it until the idea of home she's so desperate to protect is no more.

Anvari's filmmaking at times has the clunky markings of a first-time effort (which it is), and there's a sense that he's not sure when (or even if) to push into horror territory instead of allowing his subdued menace and ethereal haunts to remain just that. And the allegory is more than a little obvious, if restrained. But there's a tremendous grace to the way he inhabits this space - moving around like a ghostly spectator as Shideh's sense of reality slips into delirium bit by quiet bit - and a galvanizing power in Rashidi's performance. Swirling around her is a storm of death and fear, myth and belief, guilt and instinct - and with evil at the threshold of her very existence, and a lifetime of oppression weighing down on her, it's left to her and her alone to summon the power to slam that door shut.