Hopper later said he got the idea for the film when making "The Sons of Katie Elder" in Mexico. He says he came up with the story and got Stewart Stern to write the script; Stern had written "Rebel Without a Cause", in which Hopper played a small role. "I had time to fantasise as to what would happen when we left this village, leaving behind all the movie set fronts built on their existing adobe houses and church," said Hopper.