In ancient Baghdad, a handsome thief, Karim, falls in love with the beautiful Amina, daughter of the sultan. Also attracted to the princess is villainous Prince Osman, who gives the young girl a magic potion to make her fall in love with him. Since Amina is already in love with Karim, however, the potion turns to poison, and she becomes gravely ill. An old magician explains that she can be cured only by an enchanted blue rose that grows beyond the mystical Seven Gates. Karim, Prince Osman, and several other suitors set out in quest of the flower, but after an encounter with trees that have serpent-like branches, only Karim continues the search. He crosses a plain of boiling lava, resists and outwits the temptress Kadeejah, survives a sudden flood, battles and kills a giant, fights a group of egg-faced men, and finally flies on a winged horse to the Seventh Gate, where he finds the blue rose. On his return to Baghdad, Karim learns that Prince Osman has taken Amina prisoner and is laying siege to the city, but with the aid of a magic diamond given him by the old magician, he creates an army of his doubles and routs the enemy forces. The blue rose is destroyed in the battle, but Karim gives a white one to Amina and tells her that if she truly loves him, the flower will turn blue. When it does so and Amina recovers, the grateful sultan makes Karim the new ruler of Baghdad.