BERLIN—At a crucial point in Steven Soderbergh’s witty thriller Unsane (which premiered at the Berlin International Film Festival and hits theaters March 23), there’s a close-up of Gavin de Becker’s self-help bestseller The Gift of Fear: Survival Signals That Protect Us From Violence. In addition to the not-irrelevant fact that the book is brandished by a psychiatrist within a film in which psychiatrists are decidedly shady characters, it performs a double function: Sawyer Valentini (The Crown’s Claire Foy), the central victim of this enjoyably manipulative film, spends most of her time on screen fending off a stalker—one of de Becker’s main preoccupations. On a deeper level, Soderbergh, a director well-acquainted with film history, knows that fear is the gift that keeps on giving in genre movies.

Unsane is certainly attuned to forms of everyday paranoia that affect otherwise normal citizens, especially the fear of becoming unexpectedly unmoored from reality and ending up incarcerated against one’s will in a mental hospital. Pumping up these fears with steroids has always paid off for filmmakers. The paranoid, or perhaps entirely reasonable in some cases, fear of being tagged as the “wrong man” or “wrong woman,” as well as an object of constant surveillance, provided fodder for many of Alfred Hitchcock’s most noteworthy thrillers.

More of a tongue-in-cheek genre exercise than an earnest consideration of mental illness, Unsane joyfully pilfers motifs from a host of classic films focused on madness and deception. George Cukor’s Gaslight, Hitchcock’s Spellbound, Anatole Litvak’s The Snake Pit, Milos Forman’s One Flew Over the Cuckoo’s Nest, and Samuel Fuller’s Shock Corridor are only a few of the titles alluded to with off-handed aplomb.

Following in the footsteps of Sean Baker’s Tangerine, Unsane is a feature film shot on an iPhone, a seeming gimmick that proves quite effective inasmuch as Sawyer herself is a character adrift in a world governed by social media.

After moving to Pennsylvania from Boston to purportedly flee a stalker, she finds escape from a boring office job by going on unfulfilling Tinder dates. Once she’s locked up involuntarily at Highland Creek Behavioral Center (and is quite literarily up a creek), smartphones become crucial aids in achieving her freedom. (One suspects, though, that Soderbergh might have been pulling Gizmodo’s leg when he told them that he wanted to shoot all of his subsequent features on iPhones.)

The role of Sawyer’s apparent stalker, David Strine, also gives Joshua Leonard, best known for The Blair Witch Project, an opportunity to embody one of the most diabolically mild-mannered psychotics since Norman Bates. Finding a job as an orderly at Highland Creek, a mental hospital run by creepily upbeat bureaucrats, Leonard has considerable fun impersonating the bipolar extremes of Sawyer’s wannabe boyfriend, an alternately solicitous and homicidal predator.

Unsane will probably also end up scoring points with audiences for its merciless parody of the scam known as the American health care industry. When a resourceful undercover TV journalist named Nate (Jay Pharoah, the ex-Saturday Night Live cast member whose impeccable comic timing is a great asset) reveals to Sawyer that the facility ensnares a slew of perfectly sane patients in order to collect health insurance reimbursements, the premise, however wacky, actually seems fairly plausible. It’s not too difficult to believe that corporate America might benefit mightily from driving us all crazy.

Foy’s talents are of course crucial to the film’s success and it’s illuminating to see her as a character that is, in many respects, the polar opposite of Queen Elizabeth II. Trading in her posh regal accent for a nasal, mid-Atlantic drawl, Foy perfectly captures the jittery rhythms of a woman who is in almost perpetual crisis mode. Amy Irving, who starred in some equally twist-filled Brian De Palma films, is well-cast as Sawyer’s doting mother.

Soderbergh’s refusal to be pigeonholed has resulted in one of contemporary cinema’s most unclassifiable careers. The only element that seems to connect outright commercial projects such as Ocean’s 11 with low-budget experiments like Bubble or The Girlfriend Experience is a propensity to avoid being bored and an eagerness to defy expectations. Unsane is, perversely enough, both commercially savvy and experimental. Even though it might ultimately become a minor footnote in Soderbergh’s eclectic career, it’s a film that captures much of the politically induced schizophrenia of the Trump era while keeping alive the tradition of intelligent genre cinema.