LOS ANGELES — The stars of "Judas and the Black Messiah" found their own lives transformed as they immersed themselves in the story of Black Panther leader Fred Hampton.

Daniel Kaluuya said "a different me showed up" to the set when he was playing the magnetic Chicago-based activist, who was just 21 when he was killed by police in a 1969 raid. Dominique Fishback's conversations with Hampton's then-fiancee Akua Njeri taught her "who I wanted to be the most." And LaKeith Stanfield said he struggled through self-doubt and panic attacks while portraying an FBI informant who betrayed Hampton.

The film, co-written and directed by Shaka King and premiering in theaters and on HBO Max on Friday, follows the intersecting stories of Hampton and street criminal William O'Neal in late 1960s Chicago. As Hampton gained national attention as the outspoken chairman of the Illinois chapter of the Black Panther Party and founder of a multicultural "rainbow coalition" advocating for poor Black and Hispanic communities, O'Neal was recruited by the FBI to infiltrate the organization.

The movie marks the first time the 31-year-old Kaluuya, star of "Get Out" and "Queen & Slim," has portrayed a real person on screen.

"Reading the script and hearing his words stirred me, they moved me. ... It was almost like a call to action. I was like, yo, I'm here in the ring," Kaluuya said. "When I really understood the stakes, the cultural stakes ... I think a different me showed up."

Stanfield, who appeared alongside Kaluuya in "Get Out," delivers a twitchy performance as O'Neal, who rose to be the Panthers' head of security and took his own life in 1990. The informant had helped the FBI sketch a floor plan of Hampton's apartment, including where Hampton slept, before agents raided it, killing Hampton and another man, Mark Clark.

"The whole time I was kind of in conflict, the whole shoot — wondering if I was doing the right thing and if I was playing this character the right way because I wanted to give humanity. But I also didn't want to give him too much," the 29-year-old actor said. "I was having panic attacks on set — hands going numb just because of the level of, I guess internal contention and struggle I was going through."

Fishback said she was "so nervous" about the responsibility of carrying on Hampton's legacy but found a new role model in Njeri. "I learned who I wanted to be the most," she said. "I feel like I was on the threshold of some kind of womanhood and I didn't know how to cross it."

Fishback leaned into journaling and writing poetry as hobbies during the project, and requested to write a poem her character reads to Hampton in a key scene. It begins: "Like the masses, I was in awe when I first laid eyes on all the things you are."

Seeking historical accuracy, King consulted with Hampton's son Fred Hampton Jr. and Njeri, portrayed by Fishback in the film.

"I can't imagine the errors and the pitfalls we would have made had they not been involved," the director said.

Stanfield said that despite his mixed emotions while playing the character, he's glad the film can spotlight Hampton's story.

"Being Black in America means that your history is, by and large, misrepresented or not represented at all," he said. "So the only way that we're able to pass down our stories oftentimes is through storytelling. I'm grateful for that."