Dailies | Thomas Mann, Ezra Miller Go to Jail for ‘The Stanford Prison Experiment’ (Video)

The Kyle Patrick Alvarez-directed film is set for a July 17 release

Fake jail gets a little too real in a new trailer for “The Stanford Prison Experiment,” released on Monday.

Starring Ezra Miller (“We Need to Talk About Kevin” ) and Thomas Mann (“Me and Earl and the Dying Girl”), the film is based on a 1971 experiment conducted at Stanford University which divided 24 college students into groups of guards and prisoners for a prison simulation.

The experiment had to be cut short of its intended two weeks due to the level of cruelty that developed among the participants.

The film is directed by Kyle Patrick Alvarez (“C.O.G.”) and written by Tim Talbott. Olivia Thirlby, Jesse Carere, Billy Crudup and Keir Gilchrist also star.

Sandbar Pictures and Abandon Features financed the project, which is produced by Brent Emery and Lizzie Friedman with Greg Little, Lauren Bratman and “The Hurt Locker” star Brian Geraghty. IFC Films will handle distribution.

“The Stanford Prison Experiement” is set for release on July 17.

Watch the video.

Watch Sundance Interviews From TheWrap's Studio With the Fest's Biggest Stars (Video)