Prior to filming, Arizona State Prison Warden Robert Raines had tried to organize a rodeo for 2 years. The biggest obstacle was the cost of constructing an arena, complete with grandstand, stables, and livestock chutes. When Columbia Pictures inquired about renting the prison for a film shoot, he saw a way to realize his dream. If security could be maintained, the prison was available for a fee which matched the budget for the new rodeo grounds. Raines said, "There was a fringe benefit we didn't anticipate. Morale in the prison was never higher. Some 350 inmates signed on as extras, playing themselves, and the rest, even the most notorious troublemakers, stayed on their best behavior. There were simply no incidents."
The cast and crew had to leave the prison walking in a line, single file, every night so the guards could ensure that no inmates escaped. One night, Charles Weldon recalled, "As I was walking out, a guard asked me to stand to one side. I should have realized something was wrong, but I obeyed him without a second thought." A moment later, Weldon found himself marched toward a cell block, along with the inmate extras. Fortunately, the film's production coordinator noticed one of the actors was missing, and rushed back to the prison. Weldon added "The guard told me, 'I could have sworn you were one of our guys.' He was profusely apologetic. But I didn't mind. To an actor, there couldn't have been a higher compliment."
350 Arizona State Prison inmates worked as extras in the film.
Erland van Lidth played "Grossberger", a homicidal maniac who is maliciously assigned to be the duo's cellmate, in the hopes that he will massacre them. Van Lidth was an MIT computer science grad who accidentally turned to acting while en route to an operatic career. He said he is grateful to director Sidney Poitier for allowing him to read the script during filming. He said, "When I did Woody Allen's new picture, I never knew the title or what it was about."