When a frustrated Aladdin throws the lamp away, a redheaded female genie (Evelyn Keyes) appears and instructs him to rub the lamp, which makes him her master. She explains that only her master can see or hear her. She insists he call her Babs and, like Abdullah, behaves and talks like she is from the twentieth century. He orders her to get them out of the cave. He then decides to go back for the princess, much to the genie's disappointment (as she has fallen in love with him), and has her conjure up a retinue of servants, clothes and rich gifts. Meanwhile, the Sultan's twin brother, Prince Hadji (also played by Dennis Hoey, with a British accent in both roles), who has already tried to overthrow his brother once before, makes the Sultan his captive and takes his place undetected. Hadji is aided by the treacherous Grand Wazir Abu-Hassan (Philip Van Zandt), who is promised Armina's hand in marriage as a reward. When Aladdin shows up pretending to be a prince of Hindustan, however, the Sultan changes his mind, preferring a rich son-in-law. The genie, however, does her best to derail the romance. Spotting Kofir, who has watched the proceedings through his magic crystal and is pretending to be a merchant offering new lamps for old, the genie arranges for the unsuspecting Novira to exchange the magic lamp. Once Kofir becomes the genie's master, everything that Aladdin wished for disappears, including the gift robe the false Sultan is wearing for the wedding. Armina realizes the man is not her father, but Prince Hadji, as he does not have a scar on his arm. Aladdin and Abdullah are taken away to be hanged, but Abu-Hassan offers to spare their lives if Armina agrees to marry him. Aladdin is set free, believing Armina was only toying with him. Later, however, Novira tells him the truth. He and Abdullah track Kofir down and discover that he was overcome with excitement and died of a stroke. They steal the lamp from its next owner, a tailor, and return to the palace. At the end of a sword fight (in which Wilde gets to display his fencing skills), Hadji dies, and the grateful Sultan agrees to Aladdin and Armina's marriage. Aladdin frees the heartbroken genie.