Ali Baba and the Forty Thieves
“Open, Sesame!”: the woodcutter, the cave and clever Morgiana

Henry Justice Ford — Public domain — Wikimedia Commons
In brief
Hidden in a tree, the poor woodcutter Ali Baba sees forty thieves open a secret cave by saying a magic phrase. He goes in himself… But the thieves want revenge, and it is the slave Morgiana who, by her wits, saves the whole family. A tale published by Antoine Galland in 1717.
The tale
Ali Baba was a poor woodcutter. His brother Kasim, on the other hand, had married a rich woman. One day in the forest Ali Baba saw forty armed horsemen approaching. He hid in a tree. The thieves’ captain went up to a rock and cried: “Open, Sesame!” The rock opened, the thieves went in, then came out again, and the captain said: “Close, Sesame!”
When they had gone, Ali Baba said the phrase. He discovered a cave full of gold, silks and treasures. He took away a few bags of gold. Kasim, jealous, forced the secret out of him and went to the cave himself. But once inside, dazzled by the treasures, he forgot the magic word: he tried “Open, Barley!”, “Open, Wheat!”… In vain. The thieves found him and killed him.
The thieves realised that someone else knew their secret. One of them found Ali Baba’s house and marked the door with a chalk cross. But Morgiana, the family’s clever slave, noticed the mark and drew the same cross on every door in the street.
The thieves’ captain then came disguised as an oil merchant, with thirty-eight great jars: only one held oil, the other thirty-seven hid thieves. Morgiana discovered it, boiled the oil and poured some into each jar, putting an end to the plot. The captain came back later in disguise; Morgiana recognised him and, dancing with a dagger, killed him.
To thank her, Ali Baba set her free and married her to his son. He alone now knew the way to the cave, and he shared its treasures with his family.
Where does this tale come from?
Like Aladdin, this tale appears in no old Arabic manuscript. Antoine Galland had it from the storyteller Hanna Diyab of Aleppo and published it in the eleventh volume of his translation of the Arabian Nights, in 1717.
The phrase “Open, Sesame” has become famous all over the world for a magic way of opening any door. Sesame is a plant whose seeds burst out all at once when the ripe pod splits open.
The moral
Wits and courage are worth more than gold; greed ruins those who give in to it.
Did you know?
The real heroine of the tale is Morgiana: she is the one who foils all the thieves’ traps.
Sources: C. Perrault, Histoires ou contes du temps passé, 1697; J. and W. Grimm, Children’s and Household Tales, 1812–1857; H. C. Andersen, Fairy Tales, 1835–1872; H.-J. Uther, The Types of International Folktales, 2004; stories freely retold for this site.
Sinbad the Sailor
The Fisherman and the Jinni
Scheherazade
Aladdin and the Wonderful Lamp
The Ebony Horse