When the Wazir of Baghdad decides it is time for a new wife, Ali Oopla, his servant, begins a search for suitable candidates.
Ali is caught up in a curious case of identity confusion when Baghdad plays host to a festival of magic, and the most powerful sorcerers in the land arrive in town.
The Wazir hopes to marry his two daughters, Boobiana and Saccharine, off as the latest wives of the Sultan - the richest man in the world. However, he'll need to raise a dowry, and that could involve selling Ali to become a galley slave!
Ali's sent to the market to purchase a woman for his master to gift to the Caliph. Unfortunately a rival bidder is particularly wealthy, and Ali must pull some tricks out of his sleeve to avoid being roasted alive himself!
Ali is initially less than concerned when his master is captured for ransom or slavery by thieves operating on behalf of a foreign ruler - until, that is, he is reminded of the law decreeing the death of a slave upon the loss of his master!
When the Caliph expresses his desire to take Saccharine as his latest wife, Ali is entasked with finding the innocent girl a new husband first.