Right now, moviegoers are gawking at Wonder Woman running across a battlefield in hot pants and deflecting bullets with her bracelets.

Fantasy has its place, of course, but it would be nice if folks also made room for movies about real women in actual combat, especially when they're as skillfully told as Megan Leavey, which opens Friday.

It's the true story of a young woman (Kate Mara), troubled and adrift, who finds a home in the Marine Corps and starts to thrive amid the structure and purpose of military service. Leavey, awkward around people, also finds a soul mate – she's assigned to a canine unit and bonds with a ferocious German shepherd named Rex regarded, as Leavey once was, as a lost cause.

They are deployed to Afghanistan and Iraq, where both are wounded in the dangerous and high-stakes job of sniffing out IEDs. When her tours are over, Leavey struggles to adjust to life as a civilian, and when she learns that her damaged dog has been deemed unfit for service or repatriation, she finds purpose in adopting him – an act that is healing for both.

The job of directing the story went to Gabriela Cowperthwaite, helming her first narrative feature after making the award-winning documentary Blackfish, about the treatment of killer whales at SeaWorld.

She was brought in to the project by Mara, a Blackfish fan and animal lover, who also knew Cowperthwaite had shot several combat documentaries (the Shootout! series) for the History Channel.

"I'd done a number of these small-squad Marine stories, so I had some familiarity with action in Afghanistan and Iraq and what these wars were like, and we interviewed a lot of people, and it kind of blew my mind that I don't think we interviewed a single female," she said.

"So I was intensely curious – just how does a young woman go from being pretty aimless in a town with not a lot of prospects to becoming not only a Marine but really a leader in her squad, and part of an elite unit. I was excited to unpack that, and also excited by the fact the story didn't necessarily hit the issue of 'female in the Marines' on the head. We kind of back into it, and, pretty soon, you're just watching a story of another Marine, and a pretty damned good one," she said.

Cowperthwaite, accustomed to doing a lot of research, interviewed Leavey extensively.

"We met early on, when we were still in development and preproduction. I thought she would be this kind of stoic warrior, really just playing her cards close to the vest, because of what she'd been through in her life," she said. "But, really, she had so much warmth and so much humility. You can see she is visibly uncomfortable when you toss around words like hero. She's proud of her Purple Heart, but she doesn't talk about it. She talks about her comrades. You never hear the word me. That's very Marine, but it's also very Megan."

Cowperthwaite, like most directors, ended up feeling as though she left out some good material.

"She went on two tours," she said. "We show Ramadi, but she was also in Fallujah. So she was in country for a lot longer than we show. Her service to the Marine Corps was extensive, and it really was an important part of her identity, that identity that she had been searching for for so long."

Megan Leavey doesn't dwell on the gender dynamics in play and is matter-of-fact in its account of Leavey's life in the Corps – she gets tough love from her commanding officer (Common), some ribbing from fellow Marines, but also support.

"She ends up earning respect by really earning it, by being an authentically good Marine," the director said. "Did she have to probably jump higher than the average male? That's pretty likely. Was she hazed? Yes, but she was hazed just like a dude."

By the time Leavey is deployed, she's confident and respected enough to help those in command make tactical decisions – part of the unique nature of bomb-detecting squads, which are often required to enter hostile territory ahead of everyone else.

"They have to clear swaths of land so that everybody behind them is safe. They're in front of the front lines," she said.

In that kind of crucible, special bonds are formed among men. And women. And don't forget Rex – Leavey surely didn't.

"This is a brothers-in-arms story, but it's about a woman and a dog."