On Friday, Kristen Stewart bowed into Park City to premiere Camp X-Ray, a film that could not possibly be any more different from the actress’s previous two tween-targeted releases, Snow White and the Huntsman and The Twilight Saga: Breaking Dawn—Part 2. A newbie prison guard at the U.S. prison in Guantánamo Bay, Cuba, Stewart’s character, Cole, has spit, excrement, and punches thrown at her. She also forges an unlikely bond with one of the detainees (Payman Maadi of A Separation)—an obvious no-no for the detention-center staff.

During a Q&A after the film’s premiere, the actress told the audience at the Eccles Theater just how she prepared for this particular dramatic departure. “There were multiple documentaries that we watched,” she explained. “I hung out with this really awesome Marine, J.B., for like three days and he kind of, in a very accelerated way, whipped me into shape. It’s not a very physically strenuous role, [but] obviously you should be able to see that I have training.”

“Just putting on the uniform was a huge transformation," added director Peter Sattler. “We did so much drilling, because it completely affected your posture.”

Payman Maadi (A Separation), who shares the film’s most poignant scenes with Stewart, said that the two rehearsed as guard and detainee for over a week, even opting to stay inside the prison “for hours at a time” to get a better sense of their roles. Stewart, whose character has to walk circuitously through the camp’s halls on suicide watch, peeking in each detainee’s window and making sure they are still alive, joked that she had a hard time “learning how to turn left” after all of that right-ward circling.

And as different as her character might seem from Kristen Stewart, Twilight star, the actress said that she was “not necessarily playing someone so far outside of [herself].” In fact, they share some of the same “feelings.”

In other revelations, Sattler said that he originally wrote Stewart’s character as a man, but decided to make her female once his wife became pregnant with a daughter, causing him to contemplate issues of gender strength. Sattler also said that he was first inspired to write his script after “watching footage of a detainee and a guard in some documentary talking about some books on a book cart. ‘What is that book? Is that a good book?’ It was one of the most surreal exchanges I’ve seen in my life.” (In the film, a surprisingly funny exchange occurs when a prisoner, a rabid Harry Potter fan, suggests that the Gitmo guards’ refusal to stock the final book in the J.K. Rowling series constitutes yet another form of torture.)

Sattler says he wanted to approach the prisoner-prison guard dynamic from a new angle. “For me,” the filmmaker said, “it seemed like a cool way to address Guantánamo Bay indirectly.”