The sorcerer is a traveller from the Maghreb. Needing someone to retrieve the magical lamp for him, he pretends to be Aladdin's long lost uncle and, after winning the family over with gifts and flattery, promises to help him open a shop. Instead he takes him to the cave containing the magical lamp and sends him in, handing him a ring containing a genie. However, instead of helping Aladdin out, he demands the lamp and finally flies into a rage and blocks the cave entrance, and returns to Africa, leaving Aladdin there.
Years later, the sorcerer remembers Aladdin and, wanting to make sure he's dead, uses magic to locate him. He realizes that far from having perished, Aladdin has escaped and used the lamp to become wealthy and important. He immediately travels back to China and pretends to be a lamp seller trading new lamps for old. The princess unknowingly gives him the lamp containing the genie, and he immediately uses it to transport himself and the whole palace to Africa. While there, he keeps the lamp hidden on his person at all times; however, the princess poisons him and he dies. His brother later comes to China seeking revenge.
- In pantomime versions, he is most often known as Abanazar and is usually from Egypt. Other names have been used, including Abel el Nisir, Kiradamac, Abenazac, or Hocus Pocus.
- In Disney's 1992 animated adaptation of Aladdin, the sorcerer was combined with the character of the royal vizier and renamed Jafar.