HAVING a stalker would drive anyone mad. Just how mad is the question raised in Steven Soderbergh’s variously ingenious, intense and over-egged psycho-thriller.

Far from the safe confines of Buckingham Palace, The Crown’s Claire Foy plays a young woman who is committed to a mental institution against her will. Once inside, she becomes convinced that one of the male nurses is her stalker of old. Or it is just the sort of traumatised delusion that led her to a shrink in the first place? Either way, she’s trapped in a bona fide nightmare.

A few years ago Soderbergh announced his early retirement from making movies. Thankfully he couldn’t stay away for long. And he hasn’t lost any of his knack for surprise. He’s followed last year’s comeback, the comic crime caper Logan Lucky, with something at the far darker end of the spectrum.

We first meet Sawyer Valentini (Foy) in stark close-up, which is the perfect mode of exploring a woman whose mind is a mess of emotions. A data analyst in a bank, she’s clearly professional, smart and on her way up the ladder; she’s also haughty, rude, nervy and paranoid. She appears to have lost the ability to be trusting or sincere.

There are reasons why she’s like this. The way in which Sawyer adeptly fends off the harassing overtures of her boss suggests that she’s been here before. And there is a drip-feed reveal of the extreme stalking that forced her to relocate from her home in Boston to Philadelphia, and an empty new life.

But it’s not working. She never feels safe. And so Sawyer meets with a therapist in a private clinic. It seems like a helpful chat and she decides to book another appointment. As is always the case, however, she really needs to pay attention when filling in a form.

Soderbergh and his writers ground their film in a mordantly believable reality, that private health institutions in the US would angle to lock people up whether they are ill or not, in the expectation of being paid by insurance companies. As Sawyer’s new confidante in the institute tells her, “they keep you in until the money stops.”

And once stripped of her freedom, and thrown into a room with some genuinely troubled individuals, it’s inevitable that this highly strung woman will give her captors every legitimate excuse to extend her stay. In her mouth, the mantra “You can see I don’t belong here” becomes more and more self-defeating.

Once she sees the blandly creepy face of her stalker (Joshua Leonard) doling out her meds, the film veers from the plausibly horrendous to outright horror. Is she delusional? Is he the real thing? And if he is, is he planning to court her or kill her? For a time, we don’t know any more than Sawyer does.

And the film works best when we don’t, and when the blend of social comment and genre horror is at its finest balance. Once Unsane reveals its hand, it starts to feel very routine and rather ridiculous.

The fact that Soderbergh has shot Unsane using iPhones is only relevant or interesting to a point. It’s been done to more visually arresting effect by Sean Baker in Tangerines. What it does achieve here is a certain strangeness, particularly when in fish-eye mode, or glued to Foy’s expressive features. The actress, who’s always had a scratchy disdain in her armoury, very smartly declines to make her victim-heroine easy to like, which leaves Sawyer’s predicament all the more compelling, even when the film itself starts to unravel.