The study was conducted in the basement of the Stanford University building in a mock prison, where it lasted for two weeks, and 21 student volunteers, selected as emotionally stable, participated. Participants were randomly assigned to either the role of prisoner or guard. Prisoners and guards were encouraged to conform to their social roles both through instructions and the uniforms they wore.