Ali Baba and the Forty Thieves
Ali Baba overhears Open, Sesame, loads his donkeys with gold—and Morgiana outwits chalk marks, oil-jar assassins, and a guest who will eat no salt.
In a Persian town lived two brothers, Cassim and Ali Baba. Cassim had married wealth and lived in plenty; Ali Baba supported his wife and children by cutting wood in a nearby forest and selling it in town. One day in the wood he saw a troop of horsemen coming in a cloud of dust. Fearing robbers, he climbed a tree. When they dismounted he counted forty. They tied their horses. The finest among them—whom Ali Baba took for captain—stepped among some bushes and said clearly, “Open, Sesame!” A door opened in the rock; the troop went in, the captain followed, and the door shut by itself. Ali Baba waited in dread until at last the door opened again and the Forty Thieves came out. The captain, who had entered last, came out first, made them pass, then closed the door with “Shut, Sesame!” They bridled, mounted, and rode away as they had come.
Ali Baba climbed down, went to the hidden door, and said “Open, Sesame!” It flew open. Expecting a dull hole, he was astonished to find a large, well-lit vault cut by human hands, lit from an opening in the ceiling. Rich bales of silk and brocade were piled there, with heaps of gold and silver and money in leather purses. He went in; the door shut behind him. Ignoring the silver, he took as many bags of gold as he thought his browsing donkeys could carry, loaded them, and hid the bags under bundles of firewood. Saying “Shut, Sesame!” he closed the door and went home.
In his yard he shut the gates, carried the bags to his wife, and emptied them before her. “Keep the secret,” he said; he would bury the gold. “Let me measure it first,” she answered; “I will borrow a measure while you dig.” She ran to Cassim’s wife. Knowing Ali Baba’s poverty, the sister wondered what grain needed measuring and slyly put suet in the bottom of the measure. Ali Baba’s wife filled and emptied it often over the gold heap, then returned it without noticing a gold piece stuck to the suet. Cassim’s wife saw it at once, grew curious, and told her husband when he came home that his brother was richer than he—he did not count his money, he measured it. She showed the coin and explained. Envy kept Cassim awake. Before sunrise he went to Ali Baba with the gold piece: you pretend to be poor, yet you measure gold. Ali Baba saw that the borrowed measure had exposed their secret; he confessed and offered a share. That I expect, said Cassim, but I must know where the treasure is, or I will reveal all and you will lose everything. More from kindness than fear, Ali Baba told him of the cave and the exact words. Cassim meant to get there first and take the treasure for himself.
Early next morning he set out with ten mules loaded with great chests, found the rock door, said “Open, Sesame!” and went in; the door shut behind him. He could have stared all day, but he gathered as much as he could. When ready to leave, his mind full of riches, he could not remember the word. Instead of Sesame he said “Open, Barley!” The door stayed fast. He named grain after grain, all but the right one. Terror drove the true word clean out of his head.
About noon the robbers returned, saw Cassim’s mules with chests, and took alarm. Sabres drawn, they opened the door on the captain’s “Open, Sesame!” Cassim heard the horses, resolved to sell his life dearly, leaped out, and threw the captain down—but the band soon killed him. Inside they found bags laid ready and could not imagine how anyone had entered without their secret. They cut Cassim’s body into four quarters, nailed them up inside the cave to frighten future intruders, and went away seeking more plunder.
As night came Cassim’s wife grew uneasy and ran to Ali Baba with word of where her husband had gone. He comforted her as he could and set out for the forest. The first thing he saw in the cave was his dead brother. Full of horror, he loaded the body on one donkey and bags of gold on the other two, covered all with bundles of firewood, and returned. He drove the gold into his own yard and led the third donkey to Cassim’s house. The slave Morgiana opened—brave and cunning, as he knew. Unloading, he told her this was her master’s body, murdered, yet they must bury him as if he had died in bed. Speak with your mistress; I am come. Cassim’s wife broke into cries and tears; Ali Baba offered to take her into his household if she would keep counsel and leave everything to Morgiana. She agreed and dried her eyes.
Morgiana went to an apothecary for lozenges: her poor master could neither eat nor speak, and no one knew the distemper. Next day she returned weeping and asked for an essence given only to the dying. That evening no one was surprised at the wretched cries of Cassim’s wife and Morgiana announcing his death. The day after, Morgiana went to an old cobbler near the town gates who opened early, put gold in his hand, and bade him bring needle and thread. She blindfolded him, led him to the body, uncovered his eyes, and had him sew the quarters together; then she blindfolded him again and led him home. They buried Cassim; Morgiana followed to the grave weeping and tearing her hair, while Cassim’s wife lamented at home. Next day she went to live with Ali Baba, who gave Cassim’s shop to his eldest son.
When the Forty Thieves found Cassim’s body gone and some money-bags missing, the captain said they were discovered and would be undone unless they found who knew the secret. Two men must have known it; one was dead; they must find the other. One bold, artful thief must enter the city as a traveler and learn whom they had killed and whether people talked of the strange death—failure meant his own life. One volunteered, won praise, disguised himself, and at daybreak happened on Baba Mustapha’s stall. “Honest man, how can you stitch at your age?” asked the robber. “Old as I am,” said the cobbler, “I have good eyes—believe me, I sewed a dead body together in a place with less light than this.” Overjoyed, the robber gave gold and asked to be shown the house. At first Mustapha refused—he had been blindfolded—but more gold made him think he might remember the turnings if blindfolded as before. Led and guiding by turns, they stopped before Cassim’s house; the robber marked the door with chalk and returned well pleased to the forest. Soon Morgiana, going out, saw the mark, guessed mischief, and chalked two or three doors on each side without telling her master or mistress.
The thief reported to his comrades. The captain thanked him and asked to see the marked house—but five or six doors were chalked alike. Confounded, the guide had no answer; on their return he was beheaded for failure. A second robber won over Mustapha and marked the house in red chalk; Morgiana outwitted them again, and the second messenger died too. The captain then went himself. Wiser, he made no mark, but studied the house until he could not forget it. He ordered his men to buy nineteen mules and thirty-eight leather jars in nearby villages—all empty but one full of oil. Into each empty jar he put a fully armed man, rubbing the outsides with oil from the full vessel. The nineteen mules, loaded with thirty-seven robbers in jars plus the oil jar, reached town by dusk. The captain stopped before Ali Baba’s house and told Ali Baba, who sat outside for coolness, that he had brought oil from afar to sell at tomorrow’s market, but it was so late he knew nowhere to lodge unless Ali Baba would take him in. Though Ali Baba had seen the captain in the forest, he did not know him in an oil merchant’s disguise. He welcomed him, opened the gates for the mules, and told Morgiana to prepare bed and supper. After they had eaten, the captain went into the yard as if to see to his mules, but really to order each man: when I throw stones from my chamber window, cut your jars open with your knives and come out; I will be with you at once. Morgiana showed him to his room, then told her fellow-slave Abdallah to set a pot of broth for their master, who had gone to bed. Her lamp went out and she had no oil in the house. “Do not worry,” said Abdallah—take some from those jars in the yard. She thanked him, took the oil pot, and went out. At the first jar the robber inside whispered, Is it time?
Morgiana, finding a man instead of oil and recognising the household’s danger, answered quietly, “Not yet, but presently”. She went to jar after jar with the same reply until she reached the oil. She saw then that her master, thinking to host an oil merchant, had let thirty-eight robbers into his house. She filled her pot, lit her lamp in the kitchen, filled a large kettle from the oil jar, and when it boiled poured enough into every jar to stifle and kill the man inside. Then she put out fire and lamp and waited.
In a quarter of an hour the captain awoke, opened the window, and, finding all quiet, threw down pebbles that hit the jars. No one stirred. Uneasy, he went to the yard, asked the first jar if it slept, smelled hot boiled oil, and knew his plot to murder Ali Baba’s household was found out. All his gang were dead; the missing oil told him how. He forced a garden door, climbed walls, and escaped. Morgiana heard and saw it all, rejoiced, and went to sleep.
At daybreak Ali Baba saw the jars still there and asked why the merchant had not gone with his mules. Morgiana told him to look in the first jar for oil. Seeing a man, he started back in terror. Have no fear, she said—he is dead and cannot harm you. When he recovered enough to ask after the merchant, she said he was no more a merchant than she was, and told the whole story: a plot of the forest robbers, of whom only the captain was left, and that the chalk marks had been part of it. Ali Baba freed Morgiana at once, saying he owed her his life. They buried the bodies in his garden; his slaves sold the mules in the market.
The captain returned to his lonely cave, frightful without his lost companions, and firmly resolved to avenge them by killing Ali Baba. He dressed with care, took lodgings at an inn in town, and over many trips to the forest carried away rich stuffs and fine linen. He set up a shop opposite Ali Baba’s son, calling himself Cogia Hassan. Civil and well dressed, he soon befriended the son and, through him, Ali Baba, whom he kept inviting to supper. Wishing to return the kindness, Ali Baba invited him home, received him with smiles, and thanked him for his kindness to the boy. When the merchant made to leave, Ali Baba asked why such haste—would he not stay and sup? The merchant refused, saying he had a reason: he could eat no food that had any salt in it. “If that is all,” said Ali Baba, there shall be no salt in the meat or bread tonight. He ordered Morgiana accordingly. She was much surprised. Who is this man who eats no salt with his meat? He is an honest man, Morgiana—do as I bid. But she could not resist seeing the stranger; helping Abdallah carry dishes, she knew at once that Cogia Hassan was the robber captain and carried a dagger under his garment. I am not surprised, she thought, that this wicked man who means to kill my master will eat no salt with him—but I will hinder his plans.
She sent up the supper by Abdallah and prepared one of the boldest acts imaginable. When dessert was served and Cogia Hassan was alone with Ali Baba and his son—whom he meant to make drunk and then murder—Morgiana put on a dancing-girl’s head-dress, clasped a girdle with a silver-hilted dagger round her waist, and told Abdallah to take his tabor and divert their master and guest. Abdallah played until they reached the door; Morgiana made a low courtesy. “Come in,” said Ali Baba, and let Cogia Hassan see what you can do; she is my housekeeper. Cogia Hassan was not pleased—his chance seemed gone for the present—but he pretended eagerness. Abdallah played; Morgiana danced. After several dances she drew her dagger and made passes, sometimes toward her own breast, sometimes toward her master’s, as if part of the dance. Suddenly, out of breath, she snatched the tabor with her left hand, dagger in her right, and held the tabor to her master. Ali Baba and his son put gold into it. Cogia Hassan, seeing her come to him, pulled out his purse to tip her—and while his hand was in it Morgiana plunged the dagger into his heart.
Unhappy girl! cried Ali Baba and his son—what have you done to ruin us? It was to preserve you, not ruin you, she answered. See here—opening the false merchant’s garment to show the dagger—see what enemy you entertained! Remember, he would eat no salt with you; what more would you need? He is both the false oil merchant and the captain of the Forty Thieves.
Ali Baba was so grateful that he offered her in marriage to his son, who readily consented; a few days later the wedding was celebrated with great splendor. After a year, hearing nothing further of the robbers, Ali Baba returned to the cave. “Open, Sesame!” opened the door. Nobody had been there since the captain left. He brought away as much gold as he could carry and told his son the secret, which passed in turn to the next generation, so that Ali Baba’s children and grandchildren were rich to the end of their lives.
Where this story comes from
This retelling follows “The Forty Thieves” in Andrew Lang’s The Blue Fairy Book (1889), available as Project Gutenberg #503. The Blue Fairy Book text itself inconsistently mentions three survivors after two robbers have been executed and thirty-seven killed in jars. This telling uses the consistent count: only the captain remains. It also calls Morgiana a housekeeper after her freedom has been granted.
Other Nights selections: Andrew Lang, The Arabian Nights Entertainments (Project Gutenberg)
For older readers: contains dismemberment, beheading, people killed with boiling oil and a dagger, and enslavement.
Morgiana reads what others overlook
The suet, chalk, whispered question and concealed dagger all carry information. Cassim’s wife exploits a trace accidentally left behind; Morgiana makes the chalk useless by copying it and hears what the jars were meant to hide. Ali Baba repeatedly mistakes a disguise for a safe guest.
Survival here depends on secrecy and deception as well as quick observation, so “honesty wins” is not an accurate summary. Nor does the ending return the stolen treasure to its owners. Morgiana gains freedom, but the marriage is arranged in language that records Ali Baba’s and his son’s approval without giving her an explicit reply.
Track a clue and a response
Choose three clues. For each, identify who notices it, what they infer and what they do next. Which conclusions are checked against further evidence? Explain why refusing salt prompts suspicion in the tale but would not, by itself, prove a real guest dangerous.
The story’s transmission also matters: the Bibliothèque nationale de France account identifies Ali Baba among the stories Hanna Dyâb of Aleppo supplied to Antoine Galland as Galland expanded his French Nights. The version used on this page is the later English Blue Fairy Book telling.
Talk about it
- How does Cassim’s wife learn that Ali Baba has gold?
- How does Morgiana trick the chalk-mark spies and the men in the jars?
- Why does it matter that Cogia Hassan will eat no salt with Ali Baba?
Related stories
- The Fisherman and the Genie — another Arabian Nights escape by wit
- Aladdin and the Wonderful Lamp — treasure, danger, and a clever household
- Scheherazade and the Sultan — the frame that holds these tales