There is a distorted reflection of the story in M. René Basset’s
recently published “Contes Populaires Berbères,” No. xxix., which is to
this effect: A taleb proclaims, “Who will sell himself for 100 mitqals?”
One offers; the Kádí ratifies the sale; the (now) slave gives the money
to his mother, and follows the taleb. Away they go. The taleb repeats
certain words, upon which the earth opens, and he sends down the slave
for “the candlestick, the reed, and the box.” The slave hides the box in
his pocket and says he did not find it. They go off, and after a time
the slave discovers that his master has disappeared. He returns home,
hires a house, opens the box, and finds a cloth of silk with seven
folds; he undoes one of them, whereupon genii swarm about the room, and
a girl appears who dances till break of day. This occurs every night.
The king happens to be out on a nocturnal adventure, and hearing a
noise, enters the house and is amused till morning. He sends for the box
to be brought to the palace, gives the owner his daughter in marriage,
and continues to divert himself with the box till his death, when his
son-in-law succeeds him on the throne.