The Genie of the Lamp has been stuck in a magic lamp for 10,000 years. He was freed by Aladdin and he offered Aladdin three wishes. Aladdin asked him what he would wish for. Genie wished for his freedom from the lamp.