The story was based on a historical incident involving the kidnapping of Ion Perdicaris, an American expatriate living in Tangier (changed to a woman for the movie). However, the two children, the American attack on the Bashaw's palace in Tangier, and the climactic battle between the American and German forces, were all inventions of writer and director John Milius.
After receiving a list of BBFC requests to remove horse falls, writer and director John Milius withdrew this movie from intended U.K. video release in 1990, and claimed that no animal cruelty had taken place. His claim was supported by stuntman Terry Leonard, who threatened to sue the BBFC for besmirching his professional reputation.
In the final battle, the German officer discards his gun, and fights the Raisuli with swords. In return, the Raisuli rewards the officer with a scar, a sign of courage in upper-class Germans and Austrians. In the dueling society, the victor was seen as the person who could walk away from the duel with an obvious scar. It was important to show one's dueling prowess, but also that one was capable of taking the wound that was inflicted. Courage was shown by being able to stand and take the blow as opposed to inflicting the scar. Facial scars were most desired.
Twenty U.S. Marines were used in the making of this movie, as were several Special Forces troops from the Spanish Army. The military scenes are used as training films for the U.S. Marine Corps.
According to Nadia Sawalha, Nadim Sawalha tried to coach Sir Sean Connery to do an Arabic accent, but gave up after three days.
John Milius: He can be seen as the one-armed German officer who gives the Sultan his Maxim gun to test-fire ("Herr Sultan is displeased?"). He said he wanted to look like a waiter.