BECAUSE OF her nation, writer Lauren Beukes’s journey to Wonder Woman was highly unlikely. Yet because of her mother, Beukes’s path to Diana Prince seems designed to defy all borders.

“It was hard to get hold of American comics growing up in apartheid South Africa,” Beukes, 38, tells The Post’s Comic Riffs, “but my mom took us on a trip to the U.S. when I was 5 and bought me Star Wars action figures and Disneyland T-shirts and an oversized Wonder Woman read-along comic and record — and I read it until it fell apart and the LP scratched.”

In buying that comic and record, though, Beukes’s mother wasn’t simply making a random choice.

“Wonder Woman was my mom’s superhero girl crush when she was a kid,” Beukes says. “She wanted to grow up to be Wonder Woman.”

So when Beukes, an award-winning novelist (“The Shining Girls,” “Zoo City”), was recently approached to write a Wonder Woman story, she saw a chance with a Sensation Comics tale to craft a story for her family.

Kristy Quinn, an editor at DC Comics, had reached out to Beukes to ask whether she’d be interested in writing a South African spin on Wonder Woman. Beukes, who was amid a four-continent promotional tour for her book “Broken Monsters,” had been doing mature-audience writing for DC’s Vertigo Comics, but had always wanted to write a comic book that her young daughter could enjoy.

Quinn “specifically wanted a South African take on Wonder Woman, and I wanted to write a kid-friendly story my 6-year-old daughter would appreciate,” Beukes says. “Throw in some classic Wonder Woman villains like Cheetah and Circe; sisterly rivalry; a self-made kid heroine in Zozo; invisible jets; and the chance to turn Superman into Super Pig. It all came together. ”

The end result was this week’s Sensation Comics Featuring Wonder Woman #9 that hits newsstands this Wednesday. The story was first made available digitally in January, but will see print for the first time this week, with a new cover by artist Ben Caldwell.

This Sensation Comics Featuring Wonder Woman anthology gives various writers the chance to tell their own tales starring DC’s top female superhero. In Beukes’s case, she relished the chance to craft a Wonder Woman story rooted in South Africa.

Beukes’s story sets Wonder Woman off on an adventure that unfurls in the richly imaginative mind of a young, black South African girl named Zozo. Wonder Woman goes on a mission to rescue Superman and Batman from the Cheetah, Circe the Sorceress and Medusa.

Beukes loved the opportunity to tell a Wonder Woman tale through the eyes of a child, calling the opportunity “badass.”

“I loved the action-adventure, going over the top,” Beukes says, “like the Saturday morning cartoons I grew up with — with witty banter and heroic defiance.”

This story also gave Beukes the chance to write a story where a little girl gets to imagine the same wish that Beukes’s own mother had.

“It’s about the hero we’ve all got inside. You don’t even need to suit up,” Beukes says. “Imagination is a kind of courage. This comic was a way of sharing the love of this character across three generations, from my mom to my daughter.”

Beukes’s story also features two black South African sisters. The younger sibling, full of imagination, is convinced that she really does have a lasso of truth; the elder sister, by contrast, seems ready to grow up and leave childhood fun behind.

The story, Beukes says, is “being stuck with someone you love who is also incredibly annoying, finding ways to resolve your issues, the power of imagination [and] saving the day — and getting over yourself.”

Beukes emphasizes, too, that it was important to show young women of color striving to be superheroes.

“I wish there were more kickass heroines of color that young girls could aspire to be. I’d love to see a black Wonder Woman,” Beukes says. “And hey, more kickass heroines who are more than their sex appeal — in comics that are kid-friendly for girls. And more superhero toys for girls, action figures for girls, hero T-shirts for girls that don’t say, ‘When I grow up, I’m going to marry a superhero.’ ”

“Race and gender are always going to be a big deal,” Beukes notes. “There’s no such thing as a postracial society, because that would be to ignore all of history and how we got to where we are today. The history is important, the context is important, being different, and showing that difference is important. We can’t wipe the slate clean, but we can do better.

“We can write stories that better reflect the richness and diversity of the world.”