The 1940 version of 'The Thief of Bagdad' is a loose remake of the 1924 film of the same name. Arguably, this version is more well known and influential. Ray Harryhausen sited it as an influence for his Sinbad movies, and if you watch 'Thief of Bagdad' back to back with Disney's 'Aladdin' you'll notice more than a few similarities. It was quite influential technically as well as it was the first color film to use blue screen effects. If you want to know more about the evolution of matte effects in film this video essay is worth a look.
'Thief of Bagdad' has a unique narrative structure as well. We're thrown into the middle of the story and brought up to speed with a framing device. Of all the Arabian Nights style movies I've seen this one feels the most like a 'Scheherazade is telling us a story' type deal. We're introduced to a man who likes to wear long black robes (Three guesses who the villain of this picture is!) a beautiful woman in an unending sleep, and a blind beggar who's only companion is his unusually intelligent seeing eye dog. The blind man is taken to the house where the beautiful woman is sleeping and tells an incredible story to a group of harem girls. He was not always a blind beggar but was once King Ahmed, ruler of all Bagdad!
Well, the puppet ruler at any-rate. The Grand Vizier, Jaffar, is the one pulling all the strings, and he's a bit of a tyrant. Ahmed objects to the way Jaffar is running his kingdom. Jaffar insists that he is just in executing commoners for petty crimes. Commoners are a treacherous lot who must be kept in check by fear. Jaffar advises Ahmed to disguise himself as a commoner and walk among his people so he can see for himself how vile his people are. Ahmed does this and after about two minutes of lingering with the crowds he learns that his people are rather upset with the leadership. They even have a prophecy - some mumbo jumbo about the lowest of the low soaring among the clouds and the arrow of justice - regarding the downfall of the corrupt ruler. About this time Jaffar takes his opportunity to seize control of the kingdom for good, and orders his guards to throw Ahmed in prison to face execution in the morning.
In prison Ahmed meets Abu, the titular Thief of Bagdad, and the two of them decide that escaping sounds like more fun than execution in the morning, so they do so, steal a boat, and sail off to the kingdom of Basra. It is here that Ahmed meets the Princess, who seems to be named 'the Princess' and they fall in love at first sight. But Jaffar also comes to Basra, with the intention of making the Princess his bride. The Sultan of Basra is obsessed with clockwork mechanical toys, so Jaffar offers him a mechanical flying horse in exchange for his daughter. The sultan sees this as a fair trade, and the Princess, horrified at the thought of marrying obviously-the-villian disguises herself and escapes.
Which is about where we came in. After escaping from Basra the Princess was captured by slavers and then bought by Jaffar, but she fell into an unending sleep, in which she calls out for Ahmed. Jaffar reasons that Ahmed is the only one who can wake her, and after he does so, she learns of his blindness. After being told of a doctor who can cure Ahmed she naively allows herself to be taken to a ship where the doctor supposedly lives. That 'Doctor' turns out to be Jaffar, and once the ship is underway he tells her that the only way to cure Ahmed is to let him embrace her. As soon as Ahmed's sight is restored he and Abu take off after Jaffar's ship, but Jaffar summons a magical storm to wreck their boat.
At this point the romance between Ahmed and Princess is really starting to remind me of an Edgar Rice Burroughs pulp novel. Two young lovers constantly separated by the trickery and betrayal of a dastardly villain who wants to spirit the heroine away and marry her himself. It's like something out of 'A Princess of Mars'.
Ahmed and Adu are somehow separated in the storm, and while the story was most definitely focused on Ahmed and Princess up until now, the second half of the movie becomes 'The Abu Show! ...Staring Abu!' Personally, I find the first half of the movie more interesting, but I suppose the movie IS called 'The Thief of Bagdad,' not 'The Adventures of Ahmed and Princess'. A Genie bottle washes onto the shore of the deserted island Abu is stranded on, and when he opens it he unleashes a powerful force to be reckoned with. This isn't one of your friendly Disney style Genies. This is a violent and unpredictable being who would rather squish you flat than offer to grant you wishes.
But Abu takes a page from Arabian Nights 'The Fisherman and the Genie' and tricks the genie into going back into the bottle. After Abu threatens to throw the bottle back into the sea the genie offers Abu three wishes in exchange for his freedom. After squandering his first wish, Abu asks the Genie to take him to Ahmed. The genie's power has limitations so he sends Abu on a side quest to find a magic crystal that the owner can look into and see what he desires most, so they can find Ahmed. To get this crystal Abu must scale an enormous statue and fight a giant spider.
After Abu finds the crystal the Genie reunites Ahmed and Abu, and Ahmed uses the crystal to see the Princess. Jaffar has just used a magic rose 'The Blue Rose of Forgetfulness' to give Princess amnesia. She's forgotten her love for Ahmed, her own name if she ever had one, and even where she left her car keys! Naturally she believes Jaffar when he tells her she's madly in love with him.
Abu accidentally his last wish to send Ahmed back to Bagdad, and is himself stranded by the newly freed Genie. Ahmed managed to help Princess remember where she left her keys, but after a brief sword-fight with the palace guards he is captured by Jaffar. Jaffar orders that the two young lovers be chained to opposite walls in the dungeon and executed in the morning. Princess says that 'At least they are together at last' as they look at each other longingly from their opposite walls. If you ask me, Princess has a funny definition of the word 'together'.
Abu is watching all this through the magic crystal, and frustrated that he can't do anything to help, he smashes the crystal. But faster than you can say 'Deus Ex Machina' the camera spins around a bunch and Abu is transported to another realm where this old guy gives him a crossbow and a magic carpet and more or less says 'Have Fun Storming the Castle!' So Abu flies off to stop the execution. He manages to free Ahmed, but Jaffar tries to kidnap Princess and escape on the flying mechanical horse. Abu shoots him in the face with his crossbow, fulfilling that prophecy from the beginning that you'd probably forgotten about by now about the lowest of the low and the arrow of justice.
So, the guy gets the girl, and Abu flies off on the Magic Carpet to have further adventures. If you're a sucker for the Arabian Nights style fairy tale - like I obviously am - I definitely recommend you give this one a watch.