His adventure is hardly over, though. The sorcerer hears of Aladdin’s fortune and wiles his way back to the lamp. With the help of the princess, Aladdin eventually defeats the sorcerer and gets the lamp back. Still, Aladdin and his wife have one more peril to contend with before they are allowed their happily ever after.
The orphan tales are stories that were not initially part of the One Thousand and One Nights. Aladdin and the Magic Lamp and Ali Baba and the Forty Thieves are two of the more famous orphan tales (and both have been successfully transposed to other mediums). They were added to the larger work by the French translator of the Nights, Antoine Galland, in 18th century. Galland first heard the story when he met Youhenna Diab in 1709, who had traveled to Paris from Aleppo.