“You can’t plan anything,” Jessica Chastain says of acting with animals for “The Zookeeper’s Wife.” (Focus Features)

“As an actor, they say don’t act with animals or children,” says Jessica Chastain — who didn’t have a choice in “The Zookeeper’s Wife,” which opens Friday.

Chastain plays Antonina Zabinski, a real-life woman who, with her husband, Jan (Johan Heldenbergh), used their position as owners of the Warsaw Zoo to hide hundreds of Jews during the Nazi occupation of Poland.

The Zabinskis lived on the grounds and their daily lives were intertwined with those of the animals in their care. In the film, their son has a pet skunk, lion cubs cuddle on the Zabinskis’ bed like puppies, and an ostrich follows Antonina as she does her morning rounds on her bicycle. Director Niki Caro (“Whale Rider”) wanted Chastain and the rest of her cast to have the same intimacy with their furrier co-stars.

“She didn’t want the animals to be directed,” Chastain says. “She didn’t want anyone to say, ‘OK, the animal needs to come over here and stop here and jump up.’ It created an environment they could come into and I would act around them. It wasn’t that we were leading them; they were leading us.”

Some actors would be unnerved taking cues from animals, but Chastain found it exhilarating. “When you act with an animal, you don’t know what they’re going to do,” she says. “You can’t plan anything or show up with an expectation; you have to just be open to your scene partner, to what they’re presenting and figure out how to work around it.”

That human-animal bond gave Chastain (“Interstellar”) new insight into her character. “Antonina believed all living creatures were equal; it didn’t matter what species you were,” Chastain says. “When making a film about that bond between living creatures, it was so important to me to try to create that bond with the animals themselves while shooting.”

The real-life Antonina hoped to share her rewarding experience with animals with the hundreds of people she and her husband hid at the zoo, most of whom Jan smuggled out of Warsaw’s Jewish ghetto in his truck. A refugee herself who fled Russia for Poland as a young woman, Antonina found the comfort she needed in the squawks and roars that echoed through the zoo — and she wanted to share that comfort with others.

“She was able to create her safe space, her sanctuary, when she got there,” Chastain says. “So for her, animals helped heal her trauma of what she went through as a child, and she knows through that interspecies love that she can introduce those people who are suffering to the healing powers of all living creatures.”