TORONTO -- As a dog owner and animal rights advocate, actress Kate Mara says she likes to ensure that her four-legged co-stars are treated well on set.

But that wasn't ever a concern with her new film "Megan Leavey," which stars the Emmy-nominated "House of Cards" alum as a U.S. marine corporal who bonds with a military combat dog during duty in Iraq.

That's because the film's director, Gabriela Cowperthwaite, is a noted animal rights advocate herself. Her 2013 BAFTA-nominated documentary "Blackfish" prompted changes in SeaWorld's policies for treatment of captive whales.

"I never doubted that because our director, Gabriela, is a saviour," Mara, who has two pooches of her own, said during a recent stop in Toronto.

"If you're going to talk about animal rights, she's a hero of mine."

In theatres Friday, "Megan Leavey" is based on the true story of a down-on-her-luck woman who signs up for the marines and becomes a handler in the canine unit where dogs are trained to sniff out explosives.

Rex, the German shepherd she's assigned, is aggressive at first but calms in Megan's presence and the two help save lives in Iraq.

The treatment of animals on film sets came into question recently when video leaked from the making of "A Dog's Purpose," purportedly showing a frightened German shepherd being forced into rough waters during filming in Winnipeg. After an independent, third-party investigation, the watchdog organization American Humane said the footage was "deliberately edited for the purpose of misleading the public and stoking outrage."

Still, Cowperthwaite said the incident is "a great lesson to us all."

"Productions are big machines and they have a life of their own, especially when you're in your third month of shooting and there's pressure to make your days," she said by phone from Los Angeles.

"You can see how on these sets a lot of people are just like, 'OK, can you just make the dog do that, can you just make the dog perform and do the thing he doesn't want to do, because we've all got to get out of here.' You could see that on a set, people could so quickly make bad decisions, so you've got to be constantly vigilant and continue to set the tone."

Cowperthwaite said ensuring the safety and comfort of the dogs in her film was "paramount" when she signed on to direct the screenplay by Pamela Gray.

"You have to remember that they're the only ones that didn't choose to be here and so their comfort, their safety has got to be No. 1, it's got to come first."

Cowperthwaite insisted they not shoot a lot of takes for Varco, the main German shepherd who played Rex, and his two understudies.

"I think that's where my documentary filmmaking came in handy," she said. "I just let the crew know: 'If he's doing it, Varco's going to deliver. He's a pro and he's going to give us that golden take and so the onus is ours, the responsibility is ours to make sure we're rolling and we're ready and we're light on our feet to be able to capture what it is that he's doing."'

Before filming, Mara got into shape with a trainer and a sergeant-major, and spent a couple of weeks bonding with Varco. She and Cowperthwaite also met the real Leavey, who suffered from post-traumatic stress disorder and was awarded the Purple Heart medal for her service.

"It's rare to be sent any scripts that have women in combat at all -- this is probably the first one I was sent in my long career -- so it's not like there's lots of options there in telling these stories," said Mara, 34, whose younger sister is two-time Oscar-nominated actress Rooney Mara.

"So to me, I just thought: This is a great opportunity to be a part of something like this where it's not only just about a woman but it's also about the animal aspect, which is also not told very often.

"Then luckily we got Gabriela on-board as the director and while there aren't that many more women in the film, our crew was mostly women, which was unique and felt super appropriate."