Gabriela Cowperthwaite was on the outskirts of Cartagena, Spain, directing her first feature film when she learned that SeaWorld had decided to phase out its killer whale performances. It was November 2015, just over two years after the release of “Blackfish,” her documentary about orcas in captivity.

Ever since the movie’s debut in 2013, the director had devoted nearly all her time to advocating on behalf of the theme park’s whales. “Blackfish” sparked a public outcry — celebrities urged their fans to boycott the park, government officials proposed legislation banning the breeding of orcas — and Cowperthwaite wanted to capitalize on the momentum.

But she also needed to get back to her day job: you know, filmmaking. Which is how she found herself in Spain, making “Megan Leavey,” the story of a real-life U.S. Marine who forged a deep bond with her bomb-sniffing K-9 while ferreting out explosives in Iraq.

On the day Cowperthwaite found out SeaWorld had acquiesced to public pressure, she was in the midst of filming the movie’s most harrowing scene: the moment Cpl. Leavey and her German shepherd, Rex, were nearly killed by an improvised explosive device. Suddenly, Cowperthwaite’s phone was bombarded with text messages from friends asking if she’d heard “the news about SeaWorld.”

“It was a particularly difficult time during production. Days were challenging and it was kind of a daily beat-down. Then I heard that news. It reminded me to get a little ‘Khaleesi’ about things,” she says, referring to “Game of Thrones’” cutthroat Mother of Dragons. “Like, ‘Oh, you got an empire that needs crumbling? I’m your woman.’ I don’t truly believe that for a second, but it helps to remember it. You gotta don that identity cloak from time to time.”

Cowperthwaite, 46, doesn’t outwardly radiate ferocity. She and her husband, an emergency room doctor, live with their 11-year-old twin sons in Culver City. They do “meatless Mondays” for dinner once a week and frequent a local vegan restaurant, where she favors the faux-bacon, lettuce and tomato pizza. She often posts about politics on her Facebook page, but doesn’t get aggressive about it — saying how moved she was by Khizr Khan at the Democratic National Convention, or urging those headed to the Women’s March to “stay safe and hydrated.” She’s a glass-half-full kind of person, quick to give hugs and use exclamation points.

Which isn’t to say she’s a pushover.

“Within five minutes of her walking in the room, I knew we were hiring her,” recalls Mickey Liddell, whose production company LD Entertainment financed “Megan Leavey” for roughly $20 million. The producer decided to meet with Cowperthwaite after Kate Mara, who’d been cast to play Leavey, suggested her for the job. A vocal animal rights advocate, Mara had been a big fan of “Blackfish,” hosting a luncheon for the film during awards season a few years ago. The actress and director went on to strike up a friendship, and so Mara threw Cowperthwaite’s name in the ring.

But the filmmaker still had to persuade Liddell that despite her nonfiction background, she was ready to transition to feature films.

“She was just so smart and willing to tell you what she doesn’t know,” the producer remembers. “She told me, ‘I know a lot about women and K-9s. I know how to tell this story.’ That attitude was so much better than a Powerpoint that showed the shots she was gonna do. That kind of stuff is so boring, and I couldn’t care less.”

Once Cowperthwaite got the job, there was of course somewhat of a learning curve. During pre-production in South Carolina, she spent a lot of time with her assistant director, figuring out how many scenes she could fit into a day. She was open about her lack of knowledge on computer-generated imagery. And at first, she felt constrained by the screenplay — “this document,” she says, “that everybody can see with expectations there to deliver upon.”

“What I love about documentary is these little moments that emerge that you can’t script because they are so magical. That sustains me creatively,” she says. “I felt like what I could bring to this was spontaneity and the beauty that comes from that authenticity.”

So when production got underway, she encouraged ad-libbing and rarely yelled “action,” opting instead to let scenes play out naturally. At first, her behavior surprised crew members.

“People were like, ‘What the hell are you doing? We’re going to go over time!’ But I made all my days. I was just demanding crazy agility from people who are used to doing things a certain way, asking them to be spry and light on their feet.”

She required the crew to be particularly flexible with the scenes involving Varco, the dog who played Rex. She cut one scene in which the dog walked across a field with a string on his leg that caused him to limp because it seemed to annoy the animal. And she usually wrapped Varco after one take so that he wouldn’t get too tired.

“‘I’m sorry,’” Cowperthwaite remembers saying, “‘but we’re not going to do it again because you want another spark of light in his eyes.” She has two German shepherd mixes of her own.

Growing up in Denver, the filmmaker took an early interest in animals. She treasured her books about sharks and her stuffed lion. Her parents even bought a wall-to-wall terrarium, filling it with three massive snakes: a Burmese python, an anaconda and a boa constrictor. Once her girlfriends saw a rat being fed to one of the reptiles, they never came over to her house again.

So she had some reservations about working with a dog on set — even for the story of a dog serving in the military.

“There’s moments where you think, ‘Yes, this dog being given something to do and not being idle and sitting in some tiny indoor apartment — that makes sense,’” she says. “But does that really mean he’s choosing to serve? … You’re never 100 percent fine with it, because we choose to be there and they don’t.”

Then there’s the fact that “Megan Leavey” is hitting theaters in the wake of controversy over another canine-centric film, “A Dog’s Purpose.” Shortly before that movie’s release in January, an on-set video depicting a German shepherd being forced into raging water during production leaked on TMZ. But even Mara, who admits she was “really upset” about that incident, thinks there’s an ethical way for dogs to act in movies.

“Just like we have dogs as pets and they are rewarded for sitting or doing tricks and they couldn’t be happier, I think there are ways of doing that on a movie set as well,” the actress says. “As long as there are specific rules in place and people watching (the dogs’) backs.”

Cowperthwaite felt more comfortable with the situation after she saw how close Rex was to his trainer, whom she worked closely with on set. Before each scene, she’d tell the trainer what she wanted from the dog — for him to lie passively in a cage or start barking maniacally — and then the animal and his owner would break away to spend time treat-motivating that behavior before the cameras rolled.

Going forward, she says, she hopes to oscillate between the documentary and feature worlds. But even as she moves past “Blackfish,” its legacy is still a major part of her identity.

“In any interview I’ve done with her, it is rare that people don’t mention how much ‘Blackfish’ has affected them,” Mara says. “And she’s very, very humble. I think that she knows what the film has done for the world and for orcas. But she would never look at it in a way that was too prideful.”

“The point is to not think about it,” Cowperthwaite agrees. “Because if you do, what do you do? Sit back and chill and pat yourself on the back? This amazing thing happened as a result of the film, but now you realize what’s possible. You can make a change and a difference. You almost have this gift of being given a voice.”

———

©2017 Los Angeles Times

Visit the Los Angeles Times at www.latimes.com

Distributed by Tribune Content Agency, LLC.