Ali Baba and the Forty Thieves – illustration

Magic · A retelling of a tale from One Thousand and One Nights

Ali Baba and the Forty Thieves

Ali Baba, a kind-hearted man, discovers the secret cave of forty thieves, brimming with treasure. He hopes to bring prosperity to his family, but his brother's greed leads to danger. With the help of a brave prince, Ali Baba must outwit the cunning thieves and a betraying neighbour to protect his loved ones.

Illustration from the story Ali Baba and the Forty Thieves

Introducing Ali Baba

In a far-off land of sand and sun, where the sun warmed the very stones, there lived a chap named Ali Baba. He wasn't rich; his clothes were patched, and his purse was often light. Yet, Ali Baba's heart was truly golden, shining with kindness for every person he met. He would always offer a helping hand or a cheerful word to anyone in need.

His wife, Dinarzade, was just as wonderful. Her smile was like sunshine after a storm, able to light up even the darkest of moods. "Wake up, sleepyhead!" she would call to Ali Baba in the mornings, her voice sweet as honey. And then there was Cassim, Ali Baba's younger brother. Cassim was a lively fellow, always ready with a playful tease or a funny story.

One sunny afternoon, Cassim might sneak up on Ali Baba while he was mending a basket. "Boo!" he would shout, making Ali Baba jump and then laugh. Dinarzade would shake her head, giggling at their antics from the doorway. Life with them was never dull; it was a merry adventure every single day.

Their home was a cosy little cottage, its walls painted a soft cream colour. Inside, the scent of cinnamon and warm bread often drifted through the rooms. Laughter truly never ceased there, spilling out from the open windows. The cottage stood right on the outskirts of a whispering forest, where the leaves rustled secrets to the breeze.

The Magical Words

One bright morning, Ali Baba took his mended baskets to the bustling marketplace. The air was thick with the scent of sweet dates and warm spices. Voices called out, haggling over prices, and the dusty ground buzzed with activity. Ali Baba sold his last basket and felt a pleasant tiredness. He decided to find a quiet spot to rest his feet for a moment. He found a shady corner near the old city wall, away from the noisy crowds.

Suddenly, he heard loud, gruff voices approaching. Forty men, rough-looking and dusty, rode into view. Their horses snorted, kicking up little clouds of dust as they stopped. These men were not merchants; their faces were hard and unsmiling.

"Faster, you lazy bones!" one big man growled. His voice was like grinding stones. "Our cave awaits!"

Another thief, smaller but just as stern, grumbled, "I'm hungry. Let's get to the treasure and then find some good food."

Ali Baba pressed himself against the cool stone wall. He listened closely, hardly daring to breathe.

"Soon, soon," said the big man. "The mountain holds our riches. All those sparkling jewels and gold coins!"

"And no one knows the way in," laughed a third thief, a greedy chuckle. "Except for us, and the magic words!"

Ali Baba's heart began to beat a little faster. Magic words?

"Quiet, you fools," hissed the big man, looking around nervously. "Someone might hear!"

But it was too late. Ali Baba heard the words clearly, whispered by the smaller thief: "Open Sesame!"

The thieves chuckled, satisfied. "Yes, 'Open Sesame!'" repeated the big man. "That's the key to our fortune!"

Ali Baba felt a shiver of wonder and hope. He thought of Dinarzade and Cassim. He imagined a warm fire for them, full bellies every night, and no more worries about money. He repeated the words to himself, over and over. "Open Sesame. Open Sesame." He tucked them away in his mind, like a precious secret.

The First Encounter with the Thieves

Not long after discovering the secret of the treasure, Ali Baba felt a nervous flutter in his stomach. He nudged Cassim awake before the first light of dawn. "Brother," he whispered, "we must go to the mountain." Cassim yawned, rubbing his eyes. "Now? It's still dark, Ali Baba." But the thought of the sparkling jewels soon brightened Cassim's face. They grabbed their strongest sacks and set off, their footsteps soft on the dusty path. The air was cool, smelling of damp earth and sleeping flowers. Both brothers felt their hearts thumping with a mix of excitement and fear. Ali Baba kept looking over his shoulder, as if the mountain itself was watching them.

Soon, they stood before the grey rock face, hidden by thick bushes. Ali Baba took a deep breath. Cassim gripped his arm, his eyes wide. "Are you sure, Ali Baba?" he whispered. Ali Baba nodded, his voice a low rumble. "Open Sesame!" he called out, just as he had heard the thieves. The ground beneath their feet trembled. A crack appeared in the solid rock, then slowly widened. A deep, grinding sound filled the air as the huge stone slab moved inwards, revealing a dark opening. The smell of cold, earthy dust drifted out.

The Chamber of Wonders

They stepped inside, their eyes blinking in the dim light. The air was cool and still. As their eyes adjusted, they gasped. Gold coins were piled high like small, shimmering hills. Precious jewels sparkled on rough stone shelves: rubies gleamed red, emeralds shone green, and diamonds winked like tiny stars. Cassim stared, his mouth open. "Ali Baba, look! So much!" he whispered, his voice full of wonder. "Quiet now, brother," Ali Baba warned, though his own heart beat fast. They began to fill their sacks, carefully picking up handfuls of coins and jewels. Cassim wanted to take everything, but Ali Baba shook his head. "Only what we can carry easily," he insisted. "We must be quick."

Suddenly, a faint sound reached their ears. A distant thud, then another. "What was that?" Cassim whispered, freezing. Ali Baba's eyes widened. "Hoofbeats! They're coming back!" he hissed. Cassim dropped a handful of coins with a loud clink. "Quick, hide!" Ali Baba pulled Cassim behind a tall stack of old, moth-eaten carpets. They squeezed together, hardly daring to breathe. They heard the horses getting closer, their hooves thundering on the ground outside. The cave entrance began to rumble again as the magic words were spoken from outside.

The thieves entered, their voices rough and loud. "More treasure, lads!" grumbled the big man. "Another full haul!" They walked past Ali Baba and Cassim's hiding spot, so close the brothers could smell their dusty clothes and the smoke from their pipes. Ali Baba held his breath tight. Cassim squeezed his eyes shut. The thieves did not notice the faint scent of fresh air lingering near the old carpets. They were too busy laughing and talking about their riches. Once the band of thieves had moved deeper into the cave, Ali Baba nudged Cassim. They crept out silently, their hearts still pounding. Ali Baba whispered "Close Sesame!" just as the last thief disappeared into another chamber. The rock face groaned and slowly sealed shut. They scrambled out, their heavy bags clinking softly, and ran without stopping until they were far from the mountain, their secret safe for now.

The Clever Use of Magical Words

A Clever Trap

Ali Baba watched the mountain from a safe distance. "They will be back, Cassim," he said, his brow furrowed. "We must protect our secret, and keep ourselves safe from those rough men." Cassim nodded slowly. "But how?" Ali Baba thought for a long moment, watching a hawk circle high above. Then a clever idea sparked in his mind. "We will use their own trick against them!"

He found an old leather pouch, small and dusty. Inside, he dropped a handful of shiny gold coins, just enough to catch the eye. With a charred stick, he carefully wrote "Open Sesame!" in big, clear letters on the side of the pouch. "This will be our bait," he explained to Cassim. They crept back to the mountain, placing the tempting bag right near the cave's secret opening, tucked under a grey stone.

It was not long before the pounding of hooves echoed across the valley. The band of thieves returned, their leader, Abu, grumbling loudly. "More treasure, lads! And quickly!" As they reached the rock face, Malik, one of the younger thieves, spotted the pouch. "Look, Abu! A forgotten bag!" He picked it up, curiosity shining in his eyes. "It says 'Open Sesame!' right here!"

Abu laughed, a deep, booming sound. "Someone's playing games! Don't you know those words, Malik?" He snatched the bag. "Open Sesame!" he roared, never guessing it was a trap. The rock face groaned and slid open. The thieves, surprised, stumbled forward into the dark cave. Then, with a mighty THUD, the entrance sealed behind them, trapping them inside.

Ali Baba and Cassim, hidden behind some rocks, waited until the last rumble faded. "It worked!" whispered Cassim, his eyes wide. They rushed out, quickly saying "Open Sesame!" The cave opened again, revealing the bewildered thieves shouting inside. Ali Baba and Cassim grabbed as many bags of gold and jewels as they could carry. Then they quickly said "Close Sesame!" The cave sealed once more. The thieves were left to wonder how they had been outsmarted, trapped with all their own riches.

The Consequences of Greed

Cassim clutched a ruby, its deep red colour glowing in the flickering lamplight. It was bigger than his thumb! Ali Baba carefully counted out their share of gold coins. He placed them into a simple leather pouch.

"Just look at this, Ali Baba!" Cassim cried, holding up a sparkling emerald necklace. "We could be rich beyond our wildest dreams!"

Ali Baba nodded slowly. "We have enough for now, Cassim. We must be careful. Too much talk of treasure can bring trouble."

But Cassim barely heard him. His mind buzzed with visions of even more gold. He just could not wait to spend it all. The very next morning, he hurried to Merchantez's house. Merchantez was their neighbour, known for always wanting more.

The air inside Merchantez's small home smelled of old spices and dust. Merchantez sat hunched over a worn wooden table. Cassim burst in, unable to keep his voice down. "Merchantez! You won't believe what I have to tell you!"

Merchantez looked up, his eyes narrow and curious. "What is it, Cassim? More talk of market prices?"

"No, no! Something much, much better!" Cassim leaned closer, whispering the magical words, "Open Sesame!" He told Merchantez about the secret cave. He described the piles of shining gold and twinkling jewels.

Merchantez's face lit up. His eyes became wide with wonder. "A cave full of riches? Just for saying two words?" He practically licked his lips. "And Ali Baba knows this secret?"

"Yes, but we found it together!" Cassim insisted.

Merchantez hardly listened. He saw himself, not Ali Baba, returning with carts of treasure. He imagined a grand new house. He would have the finest clothes and all the food he could eat. He pictured himself as the richest man in the land. A sly smile spread across his face. He knew he could get to the cave first. He would take it all for himself.

He patted Cassim's shoulder. "That is wonderful news, my friend. Absolutely wonderful." But his thoughts were already racing. He would slip away quietly. He would visit the cave alone. He would claim every single treasure. This greedy plan, however, would soon lead him into very real danger.

The Rescue

The sun dipped lower, painting the desert sky in shades of fiery orange and deep purple. Ali Baba stood by his humble doorway, his heart a small, worried bird fluttering in his chest. He watched the dusty track that led from the distant hills. Merchantez’s cruel words echoed in his mind, and the thought of the cunning thieves made his palms sweat. Hope felt like a wisp of smoke, ready to vanish.

Suddenly, a distant rumble grew louder, shaking the dry earth. A powerful horse, its mane flying, galloped into view. Its rider sat tall and straight. It was Prince Kamal, Ali Baba’s oldest and bravest friend. The Prince pulled his horse to a halt, a cloud of fine, ochre dust rising around them. His smile was as bright as the morning sun.

"Ali Baba! What troubles weigh so heavily on your brow?" Prince Kamal asked, his voice strong and kind. He quickly dismounted, his boots crunching softly on the gravel underfoot.

Ali Baba hurried forward, relief washing over him like a cool desert breeze. "Oh, Kamal! Merchantez means to betray me. He has told the thieves about the cave, and I fear they will come for my family and me."

A Clever Plan

Prince Kamal listened carefully, his eyes serious now. He placed a comforting hand on Ali Baba’s shoulder. "Greed has blinded Merchantez. But we are not helpless, my friend. Let us think."

They stepped inside Ali Baba’s small house, the air still warm from the day’s heat. A single oil lamp cast a gentle, wavering light on their faces. "The thieves are many," Ali Baba whispered, "and Merchantez knows our ways."

"Indeed," Prince Kamal agreed, "but cleverness can defeat brute force. We will make them believe they are walking into a trap, not a simple home." He drew a simple sketch in the dust on the wooden table. "We will set noisemakers around the house. Clay pots on strings, loose stones near the path. And inside, we will arrange cloths and bundles to look like many people are sleeping."

Ali Baba's eyes widened. "A brilliant trick! They will think we have an army!"

Together, they moved with purpose and quiet skill. They tied bells to low branches, placed empty jars where a foot might stumble, and spread thin blankets over piles of cushions. The setting moon cast long, ghostly shapes as they worked. They spoke in hushed tones, each movement careful and precise. The desert night felt still and watchful, waiting for what was to come. Their bravery, shared between them, felt stronger than any fear.

The Lesson Learned

After the clever trap worked, a great cheer rose from the hidden villagers. Ali Baba and Prince Kamal were hailed as heroes. The desert felt safe once more, its silence no longer holding threat. Soon, Ali Baba, with Prince Kamal beside him, began to share their incredible adventure. People gathered around flickering lamps, eager to hear every detail. They listened to how Ali Baba had first found the cave, not for himself, but by chance. They marvelled at the prince's quick thinking and clever plans.

The story spread like wind across the dunes. It spoke of Ali Baba’s simple, honest life and the warmth of his friendship with Prince Kamal. Their teamwork showed everyone how kindness and trust could overcome great dangers. And as the tale was told, it also warned against the peril of avarice. The greedy hearts of the thieves, always wanting more, were what brought them to such a tricky end. The villagers understood that wanting too much could lead to trouble and sorrow.

Night after night, this story became a beacon of hope and courage. It reminded everyone to hold dear what truly matters: friendship, honesty, and a kind heart. Goodnight, little ones. Let your dreams take you on grand adventures where courage shines bright and hearts are always true. Rest well, for tomorrow is another day filled with endless possibilities.

The End

Next story: Babiole
Aladdin and the Magic Lamp Surprise me Tonight's story

About this story

This retelling of Ali Baba and the Forty Thieves is perfect for an evening when your child is ready for an exciting adventure. It belongs to our collection of classic tales of Magic, featuring cleverness and courage against a backdrop of hidden treasures. Ideal for Ages 6–10, this story will leave them feeling thrilled and inspired by Ali Baba's kindness and wit.

Read this next

  • Mudjee Monedo 10 min · Ages 6–10For another exciting adventure suited for Ages 6–10, Mudjee Monedo also features a hero outwitting danger, but with the added joy of friendship.
  • The Baba Yaga 9 min · Ages 5–8If your child enjoyed the Magic and bravery in Ali Baba, The Baba Yaga offers a slightly longer, equally adventurous tale with a strong, kind protagonist.

Talk about it

The lesson

Remember, kindness and honesty are treasures far more valuable than any gold or jewels.

Questions to ask

  1. What did Ali Baba hear that made his heart beat faster?
  2. How did Ali Baba and Cassim feel when they first entered the treasure cave?
  3. What clever idea did Ali Baba have to trap the thieves inside their cave?
  4. Have you ever had to keep a big secret, like Ali Baba did?
  5. What makes Ali Baba a kind person in this story?

Words to know

chap
A friendly word for a man or boy.
ceased
When something has stopped happening.
outskirts
The very edge of a place, like a town or forest.
bustling
Full of busy people and lots of activity.
gruff
A rough, deep, and sometimes unfriendly voice.
bewildered
Feeling very confused and puzzled.

More stories like this

All Magic stories
10 min Ages 6–10 · Rhyming Stories & Poems Mudjee Monedo

Mudjee Monedo loves exploring the Enchanted Forest. One day, he discovers an ancient tree that reveals a secret: a…

7 min Ages 3–7 · Classic Tales The Gingerbread Man

A kind old woman bakes a delicious gingerbread man who springs to life and dashes off to explore the world. He meets a…

10 min Ages 5–8 · Classic Tales The Lion, the Fox, and the Beasts

The lonely Lion, king of the forest, longs for a friend. He meets the cunning Fox, who also seeks true companionship…

6 min Ages 4–8 · Classic Tales The Boy Who Cried Wolf

A mischievous boy guarding his flock enjoys tricking villagers with false cries of "Wolf!". They rush to help, only to…

7 min Ages 4–8 · Magic Son of the Island and the Turtle

Kai, born from an enchanted island and the sea, grows up surrounded by magical friends and wise old Tiko the turtle. He…

14 min Ages 4–8 · Magic Jack and the Beanstalk

Young Jack lives in a poor village and sells his family's cow for magic beans. Overnight, a colossal beanstalk grows to…