TORONTO (AP) - When Viola Davis, sculpted and hardened from months of training, first stood in the full garb of the Agojie warrior women, with her bare feet in the African sand, it was the culmination of not just the years-long push to make “The Woman King,” but of a lifelong battle.

“It was sort of metaphoric to not just everything I had done to prepare for this role but everything that I had done as a Black woman to prepare for this moment,” Davis says. “Which is to be a warrior.”

“The Woman King,” which opens in theaters Friday, is a $50 million action epic, set in 1820s West Africa, about the all-female army of the Kingdom of Dahomey. Made largely by women and featuring an almost completely Black cast, it's powerfully unlike anything Hollywood has ever produced. And just as much as “The Woman King” dramatizes the fierce fighting of the Agojie, the film represents its own struggle.

“Fighting for actors. Fighting for the director. You have to fight for the writer,” Davis, also a producer, said in an interview at the Toronto International Film Festival. “Years and years and years go by and you're still fighting. You're fighting for the budget. You're fighting for even the commercial aspects of the story. You're fighting for your hair. Fight. Fight. Fight.”

“Whenever you're doing anything new, it requires the warrior spirit,” says Davis. “What I feel now is: It was worth it.”

“The Woman King,” directed by Gina Prince-Bythewood (“The Old Guard, “Love & Basketball”), began as an idea seven years ago, after a trip to Africa by Maria Bello, the producer and actor. Enamored by the history of the Agojie, she brought the concept to producer Cathy Schulman, the producer of the Oscar-winning “Crash” and the former head of Women in Film.

Schulman knew the film could be a potent portrait of female strength, but she didn't anticipate that, following the overturning of Roe v. Wade, it might serve as a rallying cry at a time when many consider women's rights under siege.

“There couldn't be a more important time for a movie about female courage, about sisterhood, about the complexity of the female experience, not to mention the physicality of our bodies,” Schulman says.

But the producers and Davis, who was attached early on, found it difficult to convince executives and financiers to bankroll “The Woman King” at a budget large enough to provide it the scale it deserved.

“`Braveheart,' `Gladiator,' `Last of the Mohicans.' I love those movies,” says Prince-Bythewood. “Now, here was our chance to tell our story in this genre.”

“The Woman King,” a rousing emotional wallop that seamlessly fuses interior drama with action spectacle, was met with universal acclaim at its Toronto premiere as a crowd-pleaser of another kind. But the Hollywood calculus for what might appeal to a broad audience has traditionally really meant “Will white people watch it?”

“Black people did not have to love `Thelma & Louise' for `Thelma & Louise' to get made,” says Davis. “White people have to love `The Woman King' for `The Woman King' to get made - according to Hollywood.”

A pivotal moment came when “Black Panther” was released. Ryan Coogler's film featured a fictionalization of the Agojie, the Dora Milaje, and its massive worldwide box-office ($1.3 billion) was a wake-up call to the industry.

“We would not have been able to do `Woman King' without `Black Panther,' Davis says. “I'm eternally grateful to `Black Panther.”'

To ready for the shoot in South Africa, Davis and fellow cast members Thuso Mbedu, Lashana Lynch and Sheila Atim underwent a grueling monthslong regimen of weight lifting and fight training. The actors later performed their own stunts in the film. Davis, who at 57 refers to herself as “the O.G. warrior” among her younger castmates, says she never felt prouder of her body. “Not just for the way that it looked but for the way it serviced me.”

Lynch, the British actor of “No Time to Die,” would later be astonished watching herself in the film.

“I find it hard to believe that that was really me,” says Lynch. “It really taught me a lot about just what women come with. We have so much to be able to push through pain and birth children and push against the world's pressures.”

“The Woman King,” penned by Dana Stevens, shot by Polly Morgan and edited by Terilyn Shropshir, was crewed by Prince-Bythewood with women and people of color in most department-head positions.

“It breathes such a more pleasant set,” says Schulman. “Lack of drama. More attitude of the work first. Less hierarchy. I just haven't seen any job a woman can't do. That was all a fallacy.”

Lynch, visibly moved by her experience making “Woman King,” for the first time witnessed an Africa-set action drama staged outside of the white male gaze.

“`The Woman King' will be its own blueprint that I hope filmmakers and heads of studios can take as an example,” Lynch says.

Some have been skeptical of how “The Woman King” tackles history. Last month, the 1619 Project author Nikole Hannah-Jones wrote on Twitter that “it will be interesting to see how a movie that seems to glorify the all-female military unit of the Dahomey deals with the fact that this kingdom derived its wealth from capturing Africans for the trans-Atlantic slave trade.”

The Agojie were indeed a brutal and bloodthirsty army that participated in slave raids. “The Woman King,” like most historical epics, takes some artistic license. But the slave trade is a central component to its narrative. Schulman says the 1820s were chosen from the 1600-1904 history of the Dahomey kingdom specifically for the backdrop of conflict with the mightier Oyo empire, along with mounting pressure from European colonizers for captives.

“The Woman King” is hoping to make history of its own by blazing a new path for the film industry. The Sony Pictures release will hope to enliven movie theaters after a prolonged late-summer lull at the box office.

“I feel that the film is eventized,” says Schulman. “My anticipation is that we're ready for this film. We just don't know how ready we truly are.”

Davis, for her part, feels like she's been ready all her life. She has taken to calling “The Woman King” her “magnum opus” because her production company produced it, because she fought so hard for it.

“This was a hard-won battle,” says Davis. “And I won it. I feel like I won the battle.”

It's an accomplishment that sends Davis back to her initial dreams of show business as a young girl growing up poor in Rhode Island. Before encountering the reality of the film industry, her movie dreams were limitless.

“This movie affirms that it's possible,” says Davis. “That there are no limitations to my dreams. That, actually, I was right.”