Mike Flanagan directs this compelling, faithful Netflix treatment of King's book starring Carla Gugino and Bruce Greenwood.

“It” and “The Dark Tower” have the highest profiles in a year of Stephen King adaptations, but “Gerald’s Game” best demonstrates the paradoxical nature of bringing his work to the screen. The master of pulpy horror tends to go long on prose, burrowing so deep inside his characters’ psyches that the stories often lose their way. That storytelling gamble is perfectly illustrated by “Gerald’s Game,” in which a woman’s chained to a bed in a kinky sex game gone wrong, wandering the contours of her own mind. How do you make a movie out of that? Director Mike Flanagan figured it out.

It takes a specific kind of filmmaker to tackle the challenges of a single-set survival movie, whether it’s Danny Boyle in a canyon (“127 Hours”) or Rodrigo Cortés inside a coffin (“Buried”), but the closest cinematic comparison to “Gerald’s Game” is James Wan’s “Saw,” which also involves terrified people handcuffed against their will. Here, modern horror maestro Flanagan tackles the tricky proposition with a keen visual sense and plenty of disorienting twists.

As a book, “Gerald’s Game” is alternately disturbing, grotesque, and absurd; Flanagan hits all those beats on cue. The unfortunate chained woman is Jessie (Carla Gugino), whose older husband Gerald (Bruce Greenwood) takes her to a remote lakeside house in a desperate attempt to rekindle the flame of their sexless marriage. His weak attempt to arouse her with a rape fantasy quickly sours, and in the midst of a fight, he falls down dead. So Jessie’s stuck screaming for help, and possibly going mad in the process.

Much of the movie unfolds as a tense two-hander that, save for one remedial in-camera effect, may as well be a play: Jessie starts muttering to herself, then sees her dead husband rise from the floor and occupy her mind as a kind of devil on her shoulder; a spunkier version of herself shows up soon after, disputing some of his more discouraging assessments of her situation. Then there’s the nasty complication of the stray dog that wanders into the bedroom, following the smell of fresh meat, and the grinning, phantom humanoid that Jessie sees in the moonlight late at night that may or may not be real.

Gugino and Greenwood deliver first-rate performances enriched by their characters’ ambiguous qualities; it’s never quite clear if Jessie’s figuring out a way out of her situation or actually going crazy. It’s a fascinating ride to watch them hash it out — Greenwood delivers a brilliantly unsettling monologue designed to knock down Jessie’s confidence, but she bounces back shortly afterward with a decision that will shock viewers even if they see it coming.

This surprisingly faithful adaptation includes one major digression, in an ongoing flashback to a traumatic incident from Jessie’s youth. While the bedroom sequences are brightly lit from a number of angles that play up the claustrophobia, her childhood scenes have a remarkable expressionistic quality. Set against the red-hued backdrop of a solar eclipse, we find Jessie revisiting her abusive father (Henry Thomas) through the lens of its impact on her damaged adulthood, and Gugino makes her terrible situation entirely credible.

Unfortunately, Gugino is often a victim of material that doesn’t always succeed at the depth it aims to achieve. Shouting for help or whispering to herself in half-crazy asides, her character borders on shrill extremes. Her inner monologues are marred by assertions that might have worked better on the page: “Men aren’t blessed with penises so much as cursed by them,” her subconscious declares at one point, and when contemplating the dog, she asserts, “Our friend in the hallway is every man we’ve ever known.” Well, duh.

Nevertheless, the movie maintains a gripping trajectory as Greenwood ups the creepy ante and the prospects for Jessie’s escape grow dim. As with Flanagan’s “Hush,” a home-invasion story featuring a deaf survivor, the filmic challenge takes the lead. An appropriate production for Netflix’s bare-bones approach, the movie’s central imagery involves a series of overhead shots and closeups of Gugino’s face, turning her resilience in the midst of a ludicrous scenario into the main engine of the plot. From the opening credits, which find Greenwood tucking the handcuffs into a bag while Sam Cooke belts out “Bring It On Home to Me,” it’s clear that Flanagan’s up for the challenge of enlivening this material with every possible audiovisual tool at his disposal.

Thanks to a grab bag of striking imagery and a gory payoff that doesn’t disappoint, he’s largely successful in that regard. But that doesn’t stop the finale of “Gerald’s Game” from nearly toppling the whole endeavor with a final reveal that’s both unnecessary and totally implausible. Fans of the book will see it coming, and nobody should be surprised it made the cut.

King’s fans revere his stories as sacrosanct and he so does he, judging by his lasting disdain for Stanley Kubrick’s take on “The Shining.” Kubrick made the movie his own, but “Gerald’s Game” is King by the book. So when the movie arrives at a phenomenal, breakneck climax, and then keeps going with a totally implausible twist, it’s adhering to the unwritten rule: No matter who’s driving, everyone must bow to the King.

Grade: B+

“Gerald’s Game” premiered at the 2017 edition of Fantastic Fest. It premieres on Netflix September 29.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.