Aladdin (1992 movie)
When Jafar steals the lamp and releases the Genie. Jafar uses two of his wishes to become a sorcerer and to make himself the sultan. However, Aladdin tells Jafar that he is still not as powerful as the Genie. This makes Jafar wish to become a Genie as well, but this means that he is now trapped in a lamp forever.