Retold classic · Folk tale · Ages 8-12
Morgiana and the Forty Thieves
A retelling of Ali Baba and the Forty Thieves
Ali Baba discovers a cave of treasure and a secret word. When thieves come looking for him, it is his quick-thinking servant Morgiana who saves the whole household.
Reading settings — text size, spacing, theme and read-aloud mode

Ali Baba was a woodcutter, and he was poor, and he was kind. One evening he was late coming home, and he stopped under a big tree to rest his donkey. That was when he heard horses.
Forty horsemen rode up to a rock. They looked like hard men, and they carried heavy bags. Ali Baba climbed the tree without a sound.
“Open, Sesame,” said their captain.
The rock split open like a door. The men carried their bags inside and came out with their hands empty. “Shut, Sesame,” said the captain, and the rock closed again. Then they rode away.
Ali Baba waited a long time. Then he climbed down and stood in front of the rock. “Open, Sesame,” he said.
The rock opened. Inside, he saw more gold than he had ever dreamed of. Coins, cups, and jewels, stacked in the dark. He took one small bag of coins. That was all. It was enough for a year of food. Then he said, “Shut, Sesame,” and the rock closed behind him.
At home, his wife stared at the coins. “Where did you find this?” she whispered.
“In a rock,” he said. “And we will not speak of it.”
But Ali Baba had a brother. Cassim was rich, and he was not kind. The next day, Ali Baba told him the secret, because brothers tell each other things.
Cassim did not say thank you. He said, “I will go there myself.”
***
Cassim had ten mules, and he loaded them with ten big chests. He rode to the rock in the dark and stood in front of it.
“Open, Sesame,” he said.
The rock opened. Cassim laughed and walked in. He had never seen so much gold in one place. He filled his chests until they were heavy. He filled his pockets. He filled his hat.
Then he went to the door and said, “Open, Barley.”
The rock did not move.
“Open, Wheat,” he said.
Nothing.
“Open, Rice. Open, Corn. Open, Oats.”
He tried every grain he could think of. The rock stayed shut. In his greed, he had forgotten the one word that mattered.
Ali Baba waited at home. By morning, Cassim had not come back. Ali Baba took his donkey and went to the rock. “Open, Sesame,” he said.
The rock opened. His brother was inside, and his brother was not alive. Ali Baba knelt there for a long moment. Then he wrapped Cassim in his own cloak and carried him out. He loaded him onto the donkey and brought him home.
He buried his brother quietly, without a word to anyone. The neighbors asked questions. Ali Baba only said, “He was my brother.”
That night, he sat by the window and did not sleep. He did not want the gold anymore. He wanted his brother, and his brother was gone.
The thieves came back to the cave and found the gold thinner than before. Their captain stood in the dark and said nothing for a long while. Then he said, “Someone knows our door. Find him.”
One of the men went into the town and listened at the market. He heard how the woodcutter’s brother had died, and how the woodcutter had come home with a strange load on his donkey. The thief followed the road back to Ali Baba’s house and drew a white chalk mark on the door.
Morgiana was the servant in that house. She had quick eyes and a quicker mind. She went out to buy bread that evening and saw the chalk on the door. She did not run inside and scream. She stood still and thought.
“If one door is marked,” she said to herself, “then a stranger will come looking for that mark. So let every door wear one.”
She borrowed a piece of chalk from the baker’s boy and marked every door on the street. She marked the baker’s door and the tailor’s door and the old widow’s door at the corner. She marked both sides of the lane, all the way to the well. Then she went home and said nothing to anyone.
The thieves came at midnight. Their captain walked down the street with a lamp and looked for the white mark. Every door had one. He stood in the lane and turned in a slow circle. White chalk shone on every house like little moons.
“Which one?” whispered the man behind him.
“I don’t know,” said the captain. His voice was tight with anger. “I cannot tell them apart.”
They went away into the dark, and the street slept on. Morgiana lay awake a while, listening, and when she heard the horses pass the well, she turned over and closed her eyes.
***
A week later, a merchant came to the door with forty jars of oil on a cart. He wore a brown coat and a patient smile. “I have come far,” he said to Ali Baba. “May I leave my jars in your yard tonight, and sell them in your market tomorrow?”
Ali Baba was a kind man, and tired, and he said yes. The merchant’s men rolled the jars into the yard and went away. The merchant himself took a room by the kitchen.
Morgiana could not sleep. Her lamp had gone out, and she needed oil for the morning. She took her little jug and crept out to the yard, where the jars stood in a row.
She lifted the lid of the first jar. Inside, a man’s voice whispered, “Is it time?”
Morgiana caught her breath. She did not scream. She put the lid back gently and moved to the next jar. “Is it time?” said another voice. And the next, and the next. Thirty-nine voices, all waiting for a word.
She filled her jug from the last jar, which held only oil, and went inside. Her hands were shaking, but her mind was clear. She woke Ali Baba and put her finger to her lips.
“Do not shout,” she whispered. “There are men in the jars. Wake the household. Bring every lamp and every pot.”
They lit the lamps and boiled the oil, and they poured it into the jars while the men inside cried out and scrambled. The thieves ran from the yard into the night, stumbling over each other, and they did not come back.
The merchant was gone before dawn.
For a while, the street was quiet. Ali Baba’s family kept the doors shut and the lamps low. Morgiana listened at the window every night, but heard only the wind and the soft clop of a donkey going home. She thought the captain had given up.
One morning, a cloth seller knocked at the door. He had fine silks and a friendly smile, and he asked for a cup of water. Morgiana brought it. She watched him drink. His hands were smooth, and his beard was trimmed too neatly for a man who walked all day with a pack. When he left, she followed him with her eyes. He turned once at the corner and looked back at the house.
She told Ali Baba that evening. “That seller is no seller,” she said. “I have seen those eyes before. They were in the yard that night, watching the jars.”
Ali Baba went pale. “What do we do?”
“We wait,” Morgiana said. “And we watch.”
Three nights later, the cloth seller came back. He wore a beggar’s rags now, and he sat by the well across the street, rocking and muttering. Morgiana took him a bowl of soup. He thanked her in a voice that tried too hard to be old. She saw the knife under his coat.
She went inside and spoke to Ali Baba’s son. “Bring me a rope and stand by the door,” she said. “When I call, come quickly.”
She walked back to the well. The beggar looked up. “More soup?” he said.
“No,” said Morgiana. “More sense.” She stepped aside, and the son and two neighbors took him by the arms. They tied him and led him to the judge. By morning, the captain was in a cell, and his forty thieves were scattered like leaves.
***
Ali Baba led Morgiana down to the cellar. The lamps were lit, and the treasure from the cave was spread on a cloth: coins, cups, and a necklace of blue stones that caught the light. Morgiana had never seen so much at once. She stood very still.
“This is yours,” Ali Baba said. “Not mine. You saved us. You marked the doors, you counted the jars, you knew the captain when no one else did.”
Morgiana shook her head. “It was only sense,” she said. “Anyone would have seen.”
“No,” said Ali Baba. “Not anyone. I would have opened the door and let him in. My brother would have trusted him. You are the one who looked twice.”
She smiled then, a small, tired smile. “I looked twice because I was afraid,” she said. “Being afraid made me careful.”
“Then be careful for us always,” said Ali Baba. “Stay with this family. Not as a servant. As the one who keeps us.”
Morgiana looked at the treasure, and then at the plain walls of the cellar, and then at Ali Baba. “I will stay,” she said. “But I do not want the necklace. I want the house to be ordinary again. I want to hear the kettle and the children in the yard.”
And that is what happened. The treasure paid for new roofs and full winters, but the house kept its old door and its old well. Morgiana still woke early and still listened at the window, but now she heard only the birds. In the evenings, she sat with the family and told the story of the forty jars, and everyone laughed, and no one was afraid.
Written with an AI writing tool and checked automatically before publishing. How we make stories.
Where this story comes from
- Retold from
- Andrew Lang, "Ali Baba and the Forty Thieves"
- Author
- Andrew Lang (d. 1912)
- First published
- 1889
- Edition used
- Project Gutenberg ebook 503 — plot reference only; retold from the story
- Public domain because
- author died 1912; first published 1889 — clear in the US, EU and Indonesia
- Checked
- 2026-10-14
- Notes
- The original ends with a body quartered and hung, and with Morgiana boiling the thieves in oil. Neither is on the page here: one is a disappearance and a burial, the other a discovery and a rout.
This is a retelling in new words, not a copy of the original text. See sources for every classic on the site, or every story here by Andrew Lang.
