In 1971, Stanford University psychology professor Dr. Philip Zombardo began The Stanford Prison Experiment, in which he hoped to understand how an institution could affect an individual. By having some students role play as prison guards and others as prisoners, he wanted to monitor the psychological aspects of how those new roles affected them.

And yet, six days into the experiment, Zimbardo shut it down. In a very short amount of time, things had gotten out of hand, with the prison guards using their power for bad, forcing prisoners to spend time in a dark closet and perform other scarring acts. And now, director Kyle Patrick Alvarez has turned the experiment into a film, The Stanford Prison Experiment, starring Billy Crudup, Ezra Miller, Michael Angarano, and more.

"I only knew about the experiment in the most superficial way, probably from some Psych 101 class or something," Crudup, who plays Dr. Zimbardo in the film, said. "I was certainly not a psychology major but the screenplay read so taut and it was terrifying to read. [It was a] great opportunity to tell an engaging and exciting story. And then I looked at one picture of Dr. Philip Zimbardo from 1971 and I was like, ‘I definitely want to play that guy.'"

And despite the fact that the experiment was surrounded in controversy questioning the academic methods used, as well as the merits of the results, the real Dr. Zimbardo was heavily involved with the film, working with producers for years on the script.

But when it came time to play him, Crudup decided that, because the film focused more on the experiment and wasn't a character study of Zimbardo, he wouldn't meet the man he was portraying until he'd gotten comfortable with his own version of Dr. Zimbardo. "As a doctor of psychology, you do wonder what influence you'll be under when you're playing him," Crudup said. "So the idea of interviewing him and perhaps being caught in his spell I felt was a risk that I didn't need to take early on."

Eventually, Crudup got to know Zimbardo, and walking away from the film, he feels he's learned a thing or two about human psychology. "One [takeaway] is a sense of humility about how well we know ourselves and how well we can predict our behavior. There are some unconscious forces and physiological forces that make it difficult for people to behave with their moral certainty in unfamiliar situations. You imagine that you are yourself no matter what and you're always going to do the right thing, so to see young men who were quite capable and well-adjusted and attending an Ivy league institution so quickly be influenced by the role playing was alarming and humbling."

When asked what he thinks he would've done if he'd been asked to play a prison guard in this experiment in college, Crudup admitted that he wouldn't have been a hero. "I would have likely been one of the ones timidly standing on the side. And they're as complicit as the ones who are being brutal," he said. "At 19, as I was trying to fit in to my college at UNC, there's so many different ways to be insecure and vulnerable and if somebody says jump, you're most likely to jump, particularly if they're wearing a uniform. Since the people in power, the teachers and the researchers, weren't doing anything to prevent the John Wayne character from being so abusive, that's the kind of passive affirmation that that's an okay way to behave, and I think I would've been intimidated by that. I'm sorry to say. I wish I could say I would've been heroic and stopped the whole thing, but we don't have many of those people. Most of those people have a mountain named after them or something. And at the moment there is no Crudup Mountain."

Watch an exclusive clip from The Stanford Prison Experiment, which hits theaters Friday, July 17 and VOD July 24, below: