The movie was filmed on location in Spain, a country selected for its abundant desert landscape. Ironically, production was held up for several weeks due to--of all things--rain. It was also selected for its lower production costs - lower taxes, non-union crew, etc. - at the time.
All of the main characters' names are from enlightenment legends and myths from various cultures.
Filming began with an initial budget of $5M, with executive producer Mel Brooks initially investing $1.5M of his own funds. Production costs began to quickly escalate due to delays caused by the weather and on-set arguments between the cast and director. At one point Brooks was forced to fly to Spain and threatened to fire everybody. Additionally, he discovered what director Alan Johnson had shot didn't make sense or was technically of poor quality, so many re-shoots had to be done. Finally, the costs of special effects and post-production were grossly underestimated. Brooks had to raise an additional $20M to complete the film, including taking out a second mortgage on his home. After distributors MGM and UIP paid $14M for the picture, Brooks said he lost about $9M. But over the years, due to home video and DVD sales, the film has about broken even he noted.
John Boorman, of *Zardoz* and *Excalibur* fame, was approached to direct this movie. Upon reading the screenplay, he "winced repeatedly" and asked Brooksfilms for permission to overhaul it himself...thus putting more emphasis on its multicultural religious and mythological overtones, and on its themes of enlightenment. Unwilling to delay production, Mel Brooks fired Boorman...replacing him with veteran choreographer Alan Johnson. The completed film proved a disaster, both critically and commercially; Brooks later admitted that Boorman's nitpicking "probably should've been an indication of something".