It still surprises me that some of my favorite novels are westerns. It no longer surprises me that they’re written by women. The territory once dominated by Zane Grey and Louis L’Amour has long since been opened up by Paulette Jiles, Mary Doria Russell, Molly Gloss and other women who have cut fresh trails in this old genre.

The latest foray comes from Anna North, a reporter for Vox. Her new novel, “Outlawed,” stirs up the western with a provocative blend of alt-history and feminist consciousness. The result is a thrilling tale eerily familiar but utterly transformed.

The story opens in late 19th-century America, though not quite the Old West we know. In this version of our past, the Great Flu of the 1830s killed 90 percent of the U.S. population, snuffing out the Industrial Revolution and the federal government. A decimated nation was in no mood for Civil War; the few Black survivors of the plague escaped slavery on their own. And now, some 60 years later, the people remaining in the Dakotas have built a patriarchal Christian society centered on fertility.

That may sound like “The Handmaid’s Tale” with saddles instead of bonnets, but North is working entirely in her own realm. The society she imagines has developed divergent theological myths and rites, like the annual “Mothering Monday,” a raucous holiday when men and women cross-dress and get wild.

What’s most unsettling, though, is how similar so much remains to the position women long endured in America’s actual history. In “Outlawed,” marriages are celebrated for their fecundity, and mothers of lots of children enjoy considerable social power. But with medical science stuck in its earliest stages, wives bear the full blame for infertility. Although popular opinion is in flux between biology and magic, miscarriages are widely believed to be the work of witches. And as in old Salem, that fear brings down hellish punishments on women who are difficult, smart or barren.

The narrator of “Outlawed” is Ada, the plucky daughter of a divorced mother who works as a local midwife. Ada is guileless and candid with a natural storytelling manner that’s immediately engaging. At 17, she feels lucky to be married to a handsome young man who adores her. But as the months wear on and she doesn’t get pregnant, her situation grows more tenuous — then downright dangerous. When tragedy strikes her town, Ada decides to light out for the territory before grieving families start building gallows and looking for a scapegoat.

And we’re off!

Even on the run, Ada devotes herself to dispelling the religious explanations of infertility and learning the forbidden secrets of gynecological medicine. She’s particularly skeptical of the conflation of misogyny, racism and quackery that is quickly becoming vogue across the country. Though she has only erratic access to scientific literature — and what exists is infected with speculation and superstition — she’s fearless and determined. “So I began my criminal career,” she confesses, “with a leaky pen instead of a pistol and books instead of silver for my reward.”

There’s nothing formulaic or dogmatic about North’s approach, but she has cleverly repurposed the worn elements of 19th-century mythology to explore the position of childless women. The shame and sorrow these young women suffer in the 1890s is not so different from what women trying to get pregnant — or end a pregnancy — endure in our own supposedly enlightened era.

Ada has heard tales of criminal men shooting their way across the Badlands, but the real outlaws in this society are women who are unwilling or unable to be mothers. Knowing this, Ada keeps running — pursued by a sheriff who will never give up. She finally falls in with the Hole in the Wall Gang, a kind of sapphic iteration of the Jesse James gang. “These VERY DANGEROUS CRIMINALS,” a wanted poster warns, “are known to harbor among them WITCHES and people of MIXED BREED, and to engage in UNNATURAL BEHAVIOR and DRESS.” They’re led by a magnetic figure called the Kid, who rejects male and female pronouns. “I saw a handsome, dark-skinned person dressed in a top hat and tails like the mayor of Fairchild wore on festival days,” Ada says at their first meeting. “Flowing around this person’s shoulders and down onto the ground below was a cape made entirely of flowers, yellow and orange and blue and purple, so large and complex that it must have taken many days and many hands to stitch it all together.”

The Kid is a fascinating figure, alternately gentle and messianic, consumed with the dream of a society in which people can love whomever they want, identify however they feel and raise children or not. But perpetuating that vision even among the disciples is exhausting, especially as the Kid is trying to survive crippling bouts of depression.

With her budding medical skills, Ada is welcomed into this bank-robbing, feminist commune, which allows North to explore the nonconformist, queer and gender-fluid lives of brave and hunted people on the outskirts of society. “I did not understand how any of them had become what they appeared to be now: strong, high-spirited, masters of their various crafts,” she says. “It made my heart lift to think of it — perhaps I would not be green forever.”

Indeed, she catches on quick, and soon she’s riding guns-ablazing into harrowing, often deadly escapades. In North’s galloping prose, it’s a fantastically cinematic adventure that turns the sexual politics of the Old West inside out. But if this is a legendary story, it’s a legend with its own idiosyncratic and highly satisfying ending. I won’t say anything more — except that these women, as you might expect, don’t ride off into the sunset. They get down to work.

Ron Charles writes about books for The Washington Post and hosts TotallyHipVideoBookReview.com.

Outlawed

By Anna North

Bloomsbury. 261 pp. $26