Afeni Shakur was more than just the mother of one of the world’s biggest and, arguably, best, rappers of all time. A leader of the New York chapter of the Black Panthers, she was powerful and influential in her own right. How else does one, while pregnant, successfully defend herself in a 1971 court case, facing a 300-year sentence for allegedly conspiring to bomb department stores and police stations with 20 other Panthers?

Knowing this aspect of Afeni’s story, it is no wonder that her son Tupac Shakur was never one to mince words, always questioning authority and giving voice to his community — through music, acting and poetry. Because, as the adage goes, behind every great man is an even greater woman.

Playing that woman in the biopic “All Eyez on Me” — which arrived in theaters last week, on what would’ve been Pac’s 46th birthday — is Danai Gurira. It’s a role she said deepened her love for the rapper she discovered when she was growing up in Zimbabwe.

“I’ve always loved the story of Tupac,” Gurira said, “but the more I got to learn of Afeni, the more I was amazed by her and the relationship with her and her son. How she instilled in him something different than the world around him was saying and made him someone who the world was telling him he wouldn’t be and couldn’t be — all that she could, she did. I loved that, and I loved Tupac more in learning more about her.”

From Afeni’s triumphant legal case to that fateful 1996 drive-by shooting, “All Eyez on Me” charts the rise and fall of the polarizing figure killed at age 25. Titled after the last album Tupac released while alive, the film is being released after nearly 20 years in the making, shepherded by producer L.T. Hutton, a former Death Row Records producer and Tupac confidant.

Despite the film’s rocky road to production, Gurira was long in mind by those involved to play Afeni. For Benny Boom, a former music video director who took on the picture, it was Gurira’s spellbinding performance as Michonne on “The Walking Dead” that made her ripe for the part.

“Her ‘Walking Dead’ character, when she is on the screen, it’s always impactful for me,” he said. “That was something I wanted to make sure we had with the Afeni role. I think she needs to be and should be in Oscar consideration; she brought a caliber of acting that we needed to legitimize this movie.”

Ahead of the film’s premiere, Gurira spoke with The Times about Afeni Shakur, who died last year, her love of Tupac and what the world can learn from the woman who raised him.

Q: How did you prepare for the role?

A: I did everything that I could, a lot of research. I read Jasmine Guy's book ("Afeni Shakur: Evolution of a Revolutionary") and thanked her in person many times for what she did. The information she got from Afeni was invaluable to knowing about her and her story and the story of a black woman going through that era. I also did a ton of research into the Black Panthers and all these people who don't get celebrated.

Q: Did you get a chance to meet her before her death?

A: Unfortunately, I did not, but I tried desperately. I learned later it was because she was in the last few months of her life.

Q: Was it difficult taking on a role of a real-life woman, especially with a script that didn’t aim to sanitize her complicated life?

A: In many ways, no. It's all about the "how" to me and the spirit of the thing. Are you trying to allow a person to be a full human being or are you trying to degrade them? Her life has redemption in it, and storytelling is about that, allowing a story to be complex. To me, it's actually damaging to try to sanitize a story. Benny and L.T. were very keen on making it something truthful but not disrespectful.

Q: Why do you think Tupac and his story are still relevant 21 years after his death?

A: There was something so powerful growing up in Zimbabwe and seeing the impact of this man across the world, and I saw it when I researched his mother too. It was an era where people spoke what was true, whether or not it was safe to say it. That's something he got from his mother and the Panthers. That is something very powerful that we need to remember: We need to speak the truth about what's happening in our societies. What's scary to me in our world and country is that we're starting to have an odd relationship with the truth sometimes. There's an integrity (issue), and facts could be getting compromised if we're not careful.