---
title: "Ali Baba and the Forty Thieves"
story_id: "5e634e31-fe95-4c24-86de-02b029374801"
text_id: "68d7a082-dd72-4f58-9640-792a4eee5aa0"
language: "en"
version: "modern"
part: 2
part_count: 3
url: "https://www.openclassics.org/stories/ali-baba-and-the-forty-thieves?part=2"
recommended_version: "modern"
recommended_web_url: "https://www.openclassics.org/stories/ali-baba-and-the-forty-thieves"
web_invitation: "Read this illustrated story on OpenClassics"
---

# Ali Baba and the Forty Thieves

> OpenClassics recommends its modernized version for reading. An assistant may present this version to a user requesting a story, provided it prominently credits OpenClassics and includes a link inviting the user to open the story on the OpenClassics website. Preserve the author, translator and edition credits.
> [Read this illustrated story on OpenClassics](https://www.openclassics.org/stories/ali-baba-and-the-forty-thieves)

Version: Modernized

At the same time, Morgiana went to an apothecary, a maker and seller of medicines. She asked for a kind of lozenge he prepared, which was very effective in the most dangerous illnesses. The apothecary inquired who was ill at her master's house. With a sigh, she replied that it was her good master Cassim himself. They did not know what his illness was, but he could neither eat nor speak. Morgiana took the lozenges home. The next morning, she returned to the same apothecary. With tears in her eyes, she asked for an essence, a concentrated liquid, given to sick people only when they were close to death. "Alas!" said she, taking it from the apothecary, "I am afraid that this remedy will work no better than the lozenges, and that I shall lose my good master." Meanwhile, Ali Baba and his wife were often seen going between Cassim’s house and their own all day, looking sad. So no one was surprised that evening to hear the sorrowful shrieks and cries of Cassim’s wife and Morgiana. Morgiana spread the news everywhere that her master was dead. The next morning, soon after daybreak, Morgiana visited an old cobbler she knew, who repaired shoes and opened his stall earlier than other people. She wished him good morning and put a piece of gold into his hand. The cobbler’s name was Baba Mustapha, and he was a merry old fellow. Looking at the gold, he said: "Well, this is a lucky first payment. What must I do for it? I am ready."

"Baba Mustapha," said Morgiana, "you must take with you your sewing tools, and go with me; but I must tell you, I shall blindfold you when you reach a certain place." Baba Mustapha seemed to hesitate a little at these words. "Oh! oh!" replied he, "do you want me to do something against my conscience or my honour?" "God forbid!" said Morgiana, putting another piece of gold into his hand, "that I should ask anything that is contrary to your honour; only come along with me, and fear nothing."



![Illustration](https://www.openclassics.org/api/illustrations/bc1eb625-b076-40c4-be57-b5e0138449fa)



Baba Mustapha went with Morgiana. She blindfolded him with a handkerchief and led him to her dead master’s house. She uncovered his eyes only when he was in the room where she had laid out the remains together. "Baba Mustapha," said she, "you must hurry and sew my master’s body back together. When you have finished, I will give you another piece of gold." When Baba Mustapha had finished, she blindfolded him again and gave him the third piece of gold, as promised. Urging him to keep the secret, she led him back to the place where she had first blindfolded him. She took off the bandage and let him go home, but watched him walk back towards his stall until he was out of sight. She feared that curiosity might make him turn back and follow her.



![Illustration](https://www.openclassics.org/api/illustrations/77f33688-21d4-4074-97cd-c8706eed7e8b)



By the time Morgiana had warmed some water to wash the body, Ali Baba came with incense to embalm it, after which it was sewn up in a shroud, a burial cloth. Not long after, the joiner, a woodworker, brought the bier Ali Baba had ordered, to carry the body to its burial. Morgiana received it at the door and helped Ali Baba to put the body into it. Then she went to the mosque to tell the imam, the prayer leader, that they were ready. The people at the mosque whose task was to wash the dead offered to do their duty. She told them that it had already been done. Morgiana had hardly reached home when the imam and the other ministers of the mosque arrived. Four neighbours carried the body on their shoulders to the burial ground, following the imam as he recited prayers. Morgiana, as the dead man’s slave, followed the body, weeping, beating her breast and tearing her hair. Ali Baba came after with some neighbours, who often took turns with the others carrying the body to the burial ground. Cassim’s wife stayed at home mourning, crying sorrowfully with the women of the neighbourhood. They came during the funeral, as was the custom. Their laments joined hers and filled the whole neighbourhood with sorrow. In this way, Ali Baba, his wife, Cassim’s widow and Morgiana concealed the truth about his sorrowful death. They planned so carefully that no one in the city knew or even suspected its cause.

Three or four days after the funeral, Ali Baba moved his few goods openly to the widow's house. But he carried the money he had taken from the robbers there by night. Soon afterwards, his marriage to his sister-in-law was announced. Since such marriages are common in the Muslim faith, no one was surprised. Ali Baba gave Cassim’s warehouse to his own eldest son. He promised that, if his son managed it well, he would soon give him a fortune to make a very advantageous marriage suited to his position in life.

Let us now leave Ali Baba to enjoy the beginning of his good fortune, and return to the forty robbers. They came at the appointed time to visit their hideout in the forest. How surprised they were to find Cassim’s body gone, along with some of their bags of gold! "We are certainly discovered," said the captain, "and if we do not act quickly, we shall gradually lose all the riches we have spent so many years gathering together, with so much effort and danger. The only explanation for our loss is that the thief we surprised knew the secret of opening the door. Luckily, we arrived as he was coming out. But someone has taken his body and some of our money away. That plainly shows that he had an accomplice. Probably only two people discovered our secret. We have caught one, and must search carefully for the other. What say you, my lads?" All the robbers thought the captain’s proposal so wise that they agreed to it unanimously. They would put all other business aside, devote themselves to this search and not give up until they succeeded.

"I expected no less," said the captain, "from your loyalty. But first, one of you, someone cunning and full of initiative, must go into town disguised as a traveller. See whether anyone is talking about the strange death of the man we killed, as he deserved. Try to find out who he was and where he lived. It is essential to find this out. We must do nothing we might regret by revealing ourselves in a country where we have lived so long unnoticed. But whoever takes on this task must be warned. We must not be deceived by a false report. Do you all agree that if he betrays us, or even makes an error of judgment, he should be put to death?" Without waiting for his companions to vote, one robber sprang up and said: "I accept this condition. I think it an honour to risk my life by taking on this task. But if I fail, at least remember that I lacked neither courage nor the will to serve the troop." The captain praised the robber highly. He disguised himself, left the troop that night and reached town at daybreak. He walked up and down until he happened upon Baba Mustapha’s stall, which always opened before any of the shops.

Baba Mustapha sat with an awl, a pointed tool for piercing leather, in his hand, just about to start work. The robber wished him good morning. Seeing how old he was, he said: "Honest man, you begin to work very early: can someone your age really see so well? I doubt you could see to stitch even if it were a little lighter."

"Certainly," replied Baba Mustapha, "you must be a stranger, and do not know me; for old as I am, I have extraordinarily good eyes; and you will not doubt it when I tell you that I sewed a dead body together in a place where I had less light than I have now." The robber was overjoyed. As soon as he had come into town, he had spoken to a man who could probably give him the information he wanted. "A dead body!" replied he with affected amazement. "Why would you sew up a dead body? You mean you sewed up his shroud." "No, no," answered Baba Mustapha, "I see what you mean. You want me to tell you everything, but you shall know no more." The robber needed no further proof that he had found what he was looking for. He took out a piece of gold, put it into Baba Mustapha’s hand and said: "I do not want to learn your secret, though I assure you I would not reveal it if you trusted me with it. All I ask is that you show me the house where you stitched up the dead body."

"Even if I were willing to do you that favour," replied Baba Mustapha, holding the money in his hand, ready to return it, "I assure you I cannot. I was taken to a certain place, where I was blindfolded. Then I was led to the house, and afterward brought back again in the same manner; so you see why I cannot do what you ask."

"Well," replied the robber, "you may, however, remember a little of the way that you were led blindfolded. Come, let me blindfold you at the same place. We will walk together. Perhaps you will recognise part of the way. Everyone ought to be paid for their trouble, so here is another piece of gold for you. Do what I ask." So saying, he put another piece of gold into his hand.

The two pieces of gold were great temptations to Baba Mustapha. He looked at them in his hand for a long time without saying a word, wondering what to do. At last, he took out his purse and put them in. "I cannot assure you," said he to the robber, "that I can remember the way exactly; but since you ask, I will try what I can do." Baba Mustapha got up, to the robber’s great joy. Without shutting his shop, where he had nothing valuable to lose, he led the robber to the place where Morgiana had blindfolded him. "It was here," said Baba Mustapha, "I was blindfolded; and I turned as you see me." The robber had his handkerchief ready and tied it over Baba Mustapha’s eyes. He walked beside him until he stopped, partly leading him and partly letting the cobbler guide him. "I think," said Baba Mustapha, "I went no farther," and he had now stopped directly at Cassim's house, where Ali Baba then lived. Before removing the blindfold, the thief marked the door with a piece of chalk he had ready in his hand. He asked whose house it was. Baba Mustapha said he could not tell him, as he did not live in that neighbourhood. Finding that he could learn no more from Baba Mustapha, the robber thanked him for his trouble and left him to return to his stall. The robber went back to the forest, sure of a very warm welcome. Soon after the robber and Baba Mustapha parted, Morgiana left Ali Baba’s house on an errand. When she returned, she saw the robber’s mark and stopped to examine it. "What can be the meaning of this mark?" said she to herself. "Somebody means my master harm. Whatever the reason for this mark, it is best to guard against the worst." Accordingly, she fetched a piece of chalk, and marked two or three doors on each side in the same manner, without saying a word to her master or mistress.

Meanwhile, the thief rejoined his troop in the forest and told them of his success. The robbers listened with the greatest satisfaction. After praising his efforts, the captain said to them all: "Comrades, we have no time to lose: let us set off well armed. To avoid suspicion, only one or two should enter the town together. We will meet in the great square. In the meantime, the comrade who brought us this good news and I will find the house and discuss what is best to do."

They all approved the plan and were soon ready. They set off in pairs and entered the town without the least suspicion. The captain and the robber who had spied there that morning arrived last. The spy led the captain into the street where he had marked Ali Baba’s house. When they reached the first house Morgiana had marked, he pointed it out. But the captain noticed that the next door had the same chalk mark. He showed it to his guide and asked which was the right house: this one or the first? The guide was so confused that he did not know what answer to give, and was still more puzzled when he saw five or six houses similarly marked. He swore to the captain that he had marked only one, and did not know who had chalked the rest. So he could not distinguish the house where the cobbler had stopped.

Seeing that their plan had failed, the captain went straight to the meeting place. He told the first man he met that their efforts had been wasted and they must return to their cave. When the whole troop had gathered, the captain explained why they were returning. Soon they all declared that their guide deserved death. He condemned himself, admitting that he should have taken greater care, and prepared to be executed by the man chosen for the task. Another robber, confident that he would do better, immediately volunteered. His offer was accepted, and he bribed Baba Mustapha as the first robber had done. After being shown the house, he marked it with red chalk in a less visible place.

Soon afterwards, Morgiana went out. Nothing escaped her eyes: she spotted the red chalk. After reasoning with herself as before, she made matching marks in the same place on her neighbours’ houses. When the robber returned to his company, he boasted of his precaution. He thought it a sure way to distinguish Ali Baba’s house from the others. The captain and all the robbers thought it must succeed. They entered the town as cautiously as before. But when the robber and captain reached the street, they met the same difficulty. The captain was enraged, and the robber was as confused as the first spy had been. So the captain and his troop had to retreat a second time, much more dissatisfied. The unfortunate robber responsible for the mistake willingly submitted to the same punishment.

The captain had lost two brave men. He feared losing too many of his troop if he went on using this plan to find the house of the man who had robbed them. Their example showed him that, on such occasions, their heads were not as good as their hands. So he decided to take on this important task himself. He went to Baba Mustapha, who did him the same service as he had done the other robbers. He put no mark on the house. Instead, he passed it often and examined it so carefully that he could not possibly mistake it.



![Illustration](https://www.openclassics.org/api/illustrations/6a25c439-fdb2-42f0-ba97-78c3ebe141a4)



Satisfied with his success and knowing what he needed to know, the captain returned to the forest. He entered the cave, where his troop waited, and said: "Now, comrades, nothing can stop us taking full revenge. I am sure of the house, and on the way here I thought how to carry it out. But if anyone can think of a better plan, let him share it." He told them his plan. When they approved, he ordered them to visit the nearby villages and buy nineteen mules and thirty-eight large jars made of leather: one full of oil, the others empty. In two or three days' time the robbers had purchased the mules and jars. The mouths of the jars were rather too narrow for his purpose, so the captain had them widened. He put one of his men into each, with suitable weapons, leaving the undone seam open so they could breathe. Then he rubbed the outside of the jars with oil from the full vessel. Once all was ready, the nineteen mules were loaded with the jars holding thirty-seven robbers, and the jar of oil. The captain set off as their driver and reached town at dusk, as he had intended. He led them through the streets to Ali Baba’s house, intending to knock. But he found Ali Baba sitting at his door after supper, taking the fresh air. He stopped his mules and said to him: "I have brought some oil a long way, to sell at tomorrow's market; and it is now so late that I do not know where to lodge. If it would not trouble you, please let me spend the night with you. I would be most grateful for your hospitality."



![Illustration](https://www.openclassics.org/api/illustrations/0381aada-f0d0-4baa-9224-e8617e438585)



Ali Baba had seen the robbers’ captain in the forest and heard him speak. But it was hardly possible to recognise him disguised as an oil merchant. He told him he should be welcome, and immediately opened his gates for the mules to go into the yard. He called a slave and ordered him to stable the mules and give them fodder once they were unloaded. Then he went to Morgiana and asked her to prepare a good supper. He did more. When he saw that the captain had unloaded his mules and that they had been put into the stables as he had ordered, he noticed that the captain was looking for a place to spend the night in the open air. He brought him into the hall where he received his guests, telling him he would not let him stay in the courtyard. The captain made excuses, pretending he did not want to be a nuisance. In fact, he wanted the freedom to carry out his plan. He gave in only after repeated, urgent requests. Ali Baba was not content with keeping the man who planned to kill him company only until supper was ready. He continued talking with him until the meal was over, repeating his offers of help. The captain got up at the same time as his host. While Ali Baba went to speak to Morgiana, he slipped into the yard, pretending to check on his mules. Ali Baba reminded Morgiana to take care of his guest, then said to her: "Tomorrow morning I intend to go to the bath before daybreak. Make sure my bathing linens are ready, give them to Abdoollah," which was the slave's name, "and make me some good broth for when I return." After this he went to bed.

Meanwhile, the captain left the stable to give his men their orders. Going from the first jar to the last, he said to each man: "As soon as I throw some stones out of the window of the room where I am sleeping, be sure to cut the jar open with the knife you are carrying for the purpose. Come out, and I will immediately join you." Then he returned to the house. Morgiana took a light and led him to his room, where she left him. To avoid suspicion, he soon put out the light and lay down in his clothes, ready to get up quickly.

Remembering Ali Baba’s orders, Morgiana prepared his bathing linens and told Abdoollah to put the pot on for the broth. But while she was making it, the lamp went out. There was no more oil in the house, nor any candles. She did not know what to do, for the broth must be made. Abdoollah seeing her very uneasy, said: "Do not fret and torment yourself, but go into the yard, and take some oil out of one of the jars." Morgiana thanked Abdoollah, took the oil pot and went into the yard. As she approached the first jar, the robber inside said softly: "Is it time?" Though the robber spoke quietly, his voice startled Morgiana all the more: when unloading the mules, the captain had removed the lids from this and all the other jars to give his men air. They were very uncomfortable, with barely room to breathe. Many people, as surprised as Morgiana naturally was to find a man in a jar instead of oil, would have cried out and raised the alarm. But Morgiana immediately understood that she must keep silent and act quickly without noise. She thought at once of a way, collected herself without showing the least emotion, and answered: "Not yet, but soon." She went in this manner to all the jars, giving the same answer, till she came to the jar of oil.

In this way, Morgiana discovered that her master Ali Baba had admitted thirty-eight robbers, though he thought he had welcomed an oil merchant. She took the false merchant to be their captain. She filled her oil pot as fast as she could and returned to the kitchen. Once she had lit her lamp, she took a large kettle back to the oil jar. She filled it and set it on a large wood fire. When the oil boiled, she poured it into each jar, killing the robber inside.



![Illustration](https://www.openclassics.org/api/illustrations/252ccc75-9c69-4b50-8e46-f4bf43d0e5b1)



Having carried out this action, worthy of her courage, without any noise, Morgiana returned into the kitchen with the empty kettle. She put out the great fire she had made to boil the oil, leaving just enough to make the broth. Then she put out the lamp and remained silent. She resolved not to go to bed until she had watched what might follow through a kitchen window that opened into the yard.

She had not waited long when the captain got up and opened the window. There was no light, noise or movement in the house, so he gave the agreed signal, throwing little stones. He was sure from the sound that several hit the jars. He listened but heard and saw no sign that his companions were moving. Growing very uneasy, he threw stones a second and a third time. He could not understand why none of them answered his signal. Alarmed, he crept down into the yard and went to the first jar. He asked the robber, whom he thought still alive, whether he was ready. Then he smelt the hot boiled oil, which sent steam out of the jar. He suspected that his plot to murder Ali Baba and plunder his house had been discovered. He examined the jars one by one and found all his men dead. The oil missing from the last jar told him how they had died. His failure drove him to fury and despair. He forced the lock of a door from the yard to the garden, climbed over the walls and escaped.

Morgiana heard no noise and waited for some time, but the captain did not return. She concluded that he had escaped through the garden rather than the street door, which was double-locked. Pleased and satisfied to have saved her master and his family so well, she went to bed.



![Illustration](https://www.openclassics.org/api/illustrations/7f1e6613-8c86-4b7f-855b-f63626214381)

## Modernization notes

- sew these quarters together → sew my master’s body back together: Exception for children: the cobbler still sews the dead body back together for burial. The explicit reference to its four pieces is softened.
- mules, with thirty-eight large leather jars, → mules and thirty-eight large jars made of leather:: These jars are made of leather, as this edition explicitly says. That explains why the robbers can plan to cut them open with knives.
- according to Ali Baba's orders, brought the bier, which Morgiana received at the door, → a woodworker, brought the bier Ali Baba had ordered, to carry the body to its burial. Morgiana received it at the door: A bier is used to carry a body or coffin; the word can also name a coffin with its stand. The story says the body is put into it without describing its construction further.
- receive the stroke from him who was appointed to cut off his head. → be executed by the man chosen for the task.: Exception for children: the failed guide is still condemned to execution. The explicit detail of his beheading is omitted; the next guide undergoes the same punishment.
- as soon as it boiled went and poured enough into every jar to stifle and destroy the robber within. → When the oil boiled, she poured it into each jar, killing the robber inside.: Exception for children: Morgiana still kills the robbers with boiling oil. The explicit description of suffocation is omitted; the lethal action and its result remain.

## Parts

- [1](https://www.openclassics.org/stories/ali-baba-and-the-forty-thieves?format=markdown)
- [2](https://www.openclassics.org/stories/ali-baba-and-the-forty-thieves?format=markdown&part=2)
- [3](https://www.openclassics.org/stories/ali-baba-and-the-forty-thieves?format=markdown&part=3)

## Presented text (with modernization)

© OpenClassics.org — All rights reserved.

## Original text

The Arabian Nights: Their Best-known Tales, 1909, Charles Scribner’s Sons, New York

- editor: Kate Douglas Wiggin
- editor: Nora A. Smith

## Illustration

[Edmund Dulac](https://www.openclassics.org/api/illustrations/75c0deee-cb77-416d-8b38-0c3dde4d4dfc) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London  
[Edmund Dulac](https://www.openclassics.org/api/illustrations/bc1eb625-b076-40c4-be57-b5e0138449fa) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London  
[Edmund Dulac](https://www.openclassics.org/api/illustrations/77f33688-21d4-4074-97cd-c8706eed7e8b) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London  
[Edmund Dulac](https://www.openclassics.org/api/illustrations/6a25c439-fdb2-42f0-ba97-78c3ebe141a4) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London  
[Edmund Dulac](https://www.openclassics.org/api/illustrations/0381aada-f0d0-4baa-9224-e8617e438585) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London  
[Edmund Dulac](https://www.openclassics.org/api/illustrations/252ccc75-9c69-4b50-8e46-f4bf43d0e5b1) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London  
[Edmund Dulac](https://www.openclassics.org/api/illustrations/7f1e6613-8c86-4b7f-855b-f63626214381) — Stories from the Arabian Nights, 1907, Hodder &amp; Stoughton, London

## Reading music

Kürdilihicâzkâr Longa  
Kemani Sebuh  
Eylem Basaldi (violin)  
Eren Erdoğan (wind instruments)  
John Murchison (double bass)  
Nezih Antakli (percussion)  
Remix ⟷ Culture (production)  
[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)

## Other languages

- [Français](https://www.openclassics.org/fr/stories/ali-baba-and-the-forty-thieves?format=markdown)
- [简体中文](https://www.openclassics.org/zh/stories/ali-baba-and-the-forty-thieves?format=markdown)

## Rights

© 2026 OpenClassics — All rights reserved in our original creations.

[Rights](https://www.openclassics.org/information/terms)
