According to the diaries of Milo O'Shea, the role of Khasim was originally intended for Kenneth Williams. To his displeasure, he ostensibly turned down the part to avoid having to wear a turban as Williams had done in Carry On... Up the Khyber (1968).
Only a small portion of the sets were built for this movie. The rest was done with matte paintings.