The original story of Aladdin is a Middle-Eastern folk tale. It concerns an impoverished young boy named Aladdin, in a Chinese city, who is recruited by a sorcerer to retrieve a wonderful oil lamp from a magic cave. After the sorcerer attempts to double-cross him, Aladdin finds himself trapped in the cave. Fortunately, Aladdin retains a magic ring lent to him by the sorcerer. When he rubs his hands in despair, he inadvertently rubs the ring, and a Jinn ( djinni ) appears, who takes him home to his mother. Aladdin is still carrying the lamp, and when his mother tries to clean it, a second, far more powerful Jin appears, who is bound to do the bidding of the person holding the lamp. With the aid of the djinni of the lamp, Aladdin becomes rich and powerful and marries princess Badroulbadour, the Emperor's daughter. The Jinn builds Aladdin a wonderful palace - far more magnificent than that of the Emperor himself.
The sorcerer returns and is able to get his hands on the lamp by tricking Aladdin's wife, who is unaware of the lamp's importance, by offering to exchange "new lamps for old". He orders the djinni of the lamp to take the palace to his home in the Maghreb. Fortunately, Aladdin retains the magic ring and is able to summon the lesser djinni. Although the djinni of the ring cannot directly undo any of the magic of the djinni of the lamp, he is able to transport Aladdin to Maghreb, and help him recover his wife and the lamp and defeat the sorcerer.