Ali Baba and the Forty Thieves

Original Ali Baba wa al-Arba'in Harami

Folk Collection by: Arabian Folk Tale

Source: One Thousand and One Nights

Story illustration

In the days when Baghdad was the jewel of the east and the Caliph’s empire stretched to distant horizons, there lived two brothers whose fates would prove as different as the sun and the moon. The elder brother, Cassim, had married the daughter of a wealthy merchant and now lived in comfort, his hands soft from counting coins rather than toiling for them. The younger brother, Ali Baba, had chosen love over fortune and married a poor but virtuous woman. Each day, he ventured into the forest with his donkeys to gather wood, selling his modest harvest in the marketplace to provide for his humble family.

Ali Baba was content with his simple life, finding joy in his wife’s gentle smile and satisfaction in honest work. His calloused hands and sun-weathered face spoke of years spent under the open sky, and though his purse was light, his heart was at peace. “Better to sleep soundly on a mat of reeds,” he would tell his wife as they shared their evening meal of bread and dates, “than to toss restlessly on silk cushions earned through dishonesty.”

One morning, as Ali Baba worked deeper in the forest than usual, seeking the seasoned wood that commanded better prices, he heard the thunderous sound of many horses approaching at great speed. Instinctively sensing danger, he quickly drove his donkeys into a thicket and climbed high into the sturdy branches of an ancient oak tree, concealing himself among the dense foliage.

From his hidden perch, Ali Baba watched in amazement as exactly forty men on magnificent horses burst into the small clearing below. These were no ordinary travelers—their clothes spoke of wealth beyond measure, with silk robes adorned with gold thread and jeweled daggers gleaming at their sides. Yet their faces bore the hard expressions of men who lived by violence, and their eyes held the calculating coldness of those who took what they desired without regard for others.

The leader of this fearsome band, a man whose beard was as black as midnight and whose presence commanded immediate attention, dismounted and approached what appeared to be a solid wall of rock. Ali Baba held his breath, wondering what business such dangerous-looking men could have in this remote place.

To his astonishment, the leader raised his voice and called out in a voice that echoed among the trees: “Open, Sesame!”

Immediately, a section of the rock face began to grind and shift, revealing an opening large enough for the men to enter on foot. One by one, the forty thieves—for thieves they surely were—filed into the mysterious cave, leading their horses laden with heavy saddlebags that clinked with the unmistakable sound of gold and silver.

Ali Baba remained frozen in his hiding place, scarcely daring to breathe, as he watched this incredible sight. After what seemed like hours but was probably only minutes, the men emerged from the cave empty-handed, their saddlebags now hanging limp and empty. The leader again spoke the magical words, but this time commanded: “Close, Sesame!”

The rock face sealed itself as if it had never been disturbed, leaving no trace of the entrance save for Ali Baba’s memory of what he had witnessed. The forty thieves mounted their horses and rode away as swiftly as they had come, their hoofbeats gradually fading until the forest returned to its natural silence.

Ali Baba remained in the tree for a long time after they had gone, his mind reeling with the implications of what he had seen. Finally, when he was certain the thieves had not returned, he climbed down and approached the rock face. His heart pounded as he examined the seemingly solid stone, finding no visible crack or seam that might indicate a hidden entrance.

Taking a deep breath and hoping he had remembered the words correctly, Ali Baba spoke in as commanding a voice as he could muster: “Open, Sesame!”

The transformation was immediate and magical. The rock face split apart with a deep rumbling sound, revealing a spacious cave that extended far back into the mountain. Gathering his courage, Ali Baba stepped inside, and what he saw there made him gasp in wonder and disbelief.

The cave was a treasure house beyond imagination. Piles of gold coins reached nearly to the ceiling, while chests overflowing with precious gems sat beside bolts of the finest silk and brocade. Silver vessels gleamed in the dim light that filtered through cracks in the rock above, and ornate weapons decorated with precious metals lined the walls. Years—perhaps decades—of successful robbery had accumulated here, representing the stolen wealth of countless victims.

“By Allah,” Ali Baba whispered, his voice echoing in the vast chamber, “this is the treasure of kings and emperors.” Yet even as he marveled at the riches surrounding him, his conscience reminded him of their origin. These were not treasures honestly earned but goods stolen from innocent travelers and merchants who had worked hard for their prosperity.

Still, Ali Baba reasoned, the original owners were beyond help now, and leaving the treasure here would only serve the thieves when they returned. He resolved to take only what he needed to improve his family’s circumstances modestly, without drawing attention to their sudden change in fortune.

Working quickly, Ali Baba filled several bags with gold coins, selecting mostly older pieces that would be less likely to be recognized as recently stolen. He also chose a few small gems and some bolts of fine but not ostentatiously rich cloth that his wife could fashion into garments appropriate for a moderately successful merchant’s family.

When he had loaded his donkeys with as much as they could reasonably carry without appearing suspicious, Ali Baba spoke the closing command and watched the cave seal itself once more. His journey home was filled with a mixture of excitement and anxiety—excitement at the prospect of ending his family’s financial struggles, and anxiety about the dangerous men who claimed this treasure as their own.

Ali Baba’s wife was preparing their simple evening meal when her husband returned, and she immediately noticed something different in his manner. When he began unloading bag after bag of gold coins from his donkeys, she nearly fainted with shock. “Husband!” she exclaimed, grasping his arm, “what have you done? Surely you have not turned to robbery!”

With infinite patience and gentle words, Ali Baba told her the entire story of his extraordinary discovery. His wife listened with growing amazement, occasionally interrupting to ask questions that confirmed the truth of his incredible tale. When he had finished, she sat in stunned silence for several moments before speaking.

“This treasure is both a blessing and a curse,” she said finally, her wisdom showing in her dark eyes. “We must be very careful how we use it, for sudden wealth attracts dangerous attention.” She paused, looking at the pile of gold that represented more money than they had ever dreamed of possessing. “But first, I must know exactly how much we have, so we can plan wisely.”

Since counting such a vast number of coins would take days, Ali Baba’s wife decided to measure the gold by volume instead. Not owning a container large enough for the task, she went to her sister-in-law, Cassim’s wife, to borrow a measuring bowl.

Cassim’s wife, who had always looked down upon her poor relations, was immediately suspicious of this unusual request. “Why would someone who can barely afford bread need to measure anything in such large quantities?” she wondered. Curiosity overcoming courtesy, she secretly smeared honey on the bottom of the measuring bowl before lending it, hoping to discover what Ali Baba’s wife was measuring in such secrecy.

When the bowl was returned the next day, Cassim’s wife found a gold coin stuck to the honey on the bottom. Her gasp of surprise brought her husband running, and when he saw the evidence of their poor relatives’ sudden wealth, his face darkened with jealousy and suspicion.

“Brother,” Cassim demanded, arriving at Ali Baba’s house that very evening with his face flushed with anger, “what trickery is this? Yesterday you were too poor to buy meat for your table, and today you possess so much gold that you measure it like grain! Tell me immediately how you came by this treasure, or I shall report you to the authorities as a thief!”

Ali Baba, seeing that denial would be useless and knowing his brother’s stubborn nature, reluctantly told Cassim the entire story. But instead of being amazed or grateful for the information, Cassim’s eyes blazed with greed. As the elder brother, he reasoned, he deserved the larger share of any family fortune.

“You will take me to this cave immediately,” Cassim commanded, “and show me exactly how to enter. As your elder brother, I have the right to claim the greater portion of this treasure.”

Ali Baba tried to dissuade him, explaining the danger and urging caution, but Cassim’s greed had made him deaf to reason. “If you will not help me,” Cassim threatened, “I will go to the Caliph’s guards and tell them you have found stolen treasure. They will torture the location from you and keep the treasure for themselves, leaving our entire family in disgrace.”

Faced with this threat to his wife’s safety and his own life, Ali Baba reluctantly agreed to reveal the location of the cave. Early the next morning, he led his brother to the hidden entrance and demonstrated the magical words that opened the stone door.

“Remember,” Ali Baba warned as Cassim prepared to enter, “the thieves may return at any time. Take only what you can carry quickly, and do not linger to admire the treasures. Greed has been the downfall of many good men.”

But Cassim, his eyes already wide with anticipation, barely listened to his brother’s warnings. The moment the cave door opened, he rushed inside, and Ali Baba heard his gasps of amazement echoing from the depths. Knowing his brother’s nature and fearing the worst, Ali Baba returned home to wait anxiously for Cassim’s safe return.

Inside the treasure cave, Cassim was overwhelmed by the vast wealth that surrounded him. Where Ali Baba had shown restraint and taken only what his family needed, Cassim saw an opportunity to become the richest man in Baghdad overnight. He began loading bag after bag with the finest treasures—the largest gems, the most valuable coins, the most exquisite silks and precious metals.

Hours passed as Cassim filled container after container, his greed growing with each new treasure he discovered. He found pearls the size of bird’s eggs, rubies that blazed like captured fire, and diamonds that scattered rainbow light throughout the cave. “Why should I settle for comfort when I can have limitless luxury?” he muttered to himself, adding yet another bag to his growing pile.

By the time Cassim had finally gathered what he considered an appropriate amount of treasure, the day was far advanced. He loaded his mules with the heavy bags and prepared to leave, but when he approached the sealed entrance, a terrible thing happened—in his excitement and greed, he had completely forgotten the magical words that would open the door.

“Open, Barley!” he called, remembering that it was some kind of grain. Nothing happened. “Open, Wheat!” he tried desperately. Still nothing. “Open, Millet! Open, Corn!” But the stone remained sealed, trapping him inside with all his ill-gotten gains.

Panic set in as Cassim realized his predicament. He shouted every grain name he could remember, then tried other words that seemed appropriate: “Open, Treasure! Open, Riches! Open, Gold!” But nothing he said had any effect on the magical barrier. As the hours passed and exhaustion set in, Cassim began to understand that his greed had led him into a trap from which there might be no escape.

Meanwhile, the forty thieves were returning from another successful raid, their saddlebags heavy with fresh plunder. As they approached their secret stronghold, the leader noticed that the ground near the entrance showed signs of recent disturbance—footprints and the tracks of pack animals that had not been there when they left.

“Someone has discovered our secret,” the leader announced grimly, his hand moving instinctively to his sword. “Prepare yourselves, brothers. We may have rats in our granary.”

When they spoke the magical words and the cave door opened, they found Cassim cowering near the entrance, surrounded by bags of treasure he had attempted to steal. The sight of this ordinary-looking man trying to rob their carefully accumulated wealth filled the thieves with rage.

“Who are you?” the leader demanded, his voice cold as winter wind. “How did you learn our secret? Who else knows of this place?”

Cassim, terrified beyond measure, fell to his knees and begged for mercy. “I am only a poor merchant!” he lied desperately. “I discovered this place by accident and meant no harm! Please, I have a wife and family—”

But the thieves had not survived this long by showing mercy to those who threatened their security. The leader’s sword flashed in the dim light, and Cassim’s pleas were silenced forever. To serve as a warning to anyone else who might discover their secret, the thieves cut his body into four pieces and hung them just inside the cave entrance before sealing it once more.

When Cassim failed to return by nightfall, Ali Baba knew something terrible had happened. Despite the danger, he could not abandon his brother, whatever their differences had been. Very early the next morning, he made his way to the cave, his heart heavy with dread.

The sight that greeted him when the cave door opened confirmed his worst fears. Ali Baba wept bitter tears as he gathered the pieces of his brother’s body, wrapping them carefully in cloth from the treasure chamber. Even in his grief, he took the precaution of loading several bags with gold and gems, knowing that his brother’s death would leave Cassim’s wife destitute and that he would now be responsible for two households.

The journey home with his tragic burden was the longest of Ali Baba’s life. When he arrived at his house, he immediately sent for Morgiana, a clever slave girl who served in Cassim’s household and was known for her discretion and intelligence.

“Morgiana,” Ali Baba said gravely, “a great tragedy has befallen our family, and I need your help to handle it with the secrecy it requires.” He explained what had happened, emphasizing the danger they would all face if the truth became known.

Morgiana, whose quick wit had served the family well in many smaller crises, immediately grasped the gravity of the situation. “Leave this to me, master,” she said quietly. “I will ensure that your brother receives a proper burial without arousing suspicion.”

She went first to an old cobbler named Baba Mustapha, who was known for his skill with needle and thread as well as leather. “Uncle,” she said, placing a gold coin in his palm, “I have urgent need of your services, but they must be performed in complete secrecy.”

The old man’s eyes widened at the sight of the gold. “What service could be worth such payment, daughter?”

“I need you to sew something together,” Morgiana replied carefully, “but you must come with me blindfolded, and you must promise never to speak of what you do. Can you be trusted with such a task?”

Baba Mustapha, though puzzled, agreed. Morgiana blindfolded him and led him through the winding streets to Ali Baba’s house, where she guided his hands to sew Cassim’s body together for proper burial. The old cobbler, working by feel alone, never saw what he was stitching, and when the task was complete, Morgiana led him back to his shop with another gold coin for his silence.

The next day, Morgiana spread word that Cassim had fallen seriously ill during a business trip and had died suddenly. She arranged for the burial with such convincing grief and attention to religious protocol that no one suspected the true circumstances of his death.

However, the forty thieves had discovered that Cassim’s body was missing from their cave, along with a significant amount of treasure. “Someone else knows our secret,” the leader declared ominously. “The dead man had an accomplice who came to retrieve the body. We must find this person and eliminate them, or our security will be forever compromised.”

The thieves began a careful investigation, sending scouts into the city to listen for any gossip about sudden deaths or unexplained wealth. It was one of these scouts who approached Baba Mustapha’s shop and, through casual conversation and well-placed coins, learned about the strange blindfolded sewing task the old cobbler had performed.

“Uncle,” the thief said with false friendliness, “surely you could remember the way to the house where you performed this mysterious service, even if you were blindfolded?”

Baba Mustapha, made careless by the wine the thief had bought him, boasted, “Young man, my feet have walked these streets for sixty years. I could find any house in Baghdad blindfolded, even if I had only been there once.”

The thief convinced the old cobbler to retrace his steps, and by following the route Morgiana had taken, they arrived at Ali Baba’s house. The thief marked the door with a piece of chalk, then returned to report his success to the other thieves.

But Morgiana’s sharp eyes noticed the chalk mark that very afternoon. Immediately understanding its sinister purpose, she quickly marked several other doors in the neighborhood with identical chalk marks, ensuring that if enemies came seeking Ali Baba’s house, they would be unable to identify it among the many marked doors.

When the thieves returned that night, they found the entire street marked with chalk signs. Furious at this setback, the leader executed the incompetent scout and sent another thief to try again. This second thief used red chalk to mark Ali Baba’s door, but Morgiana spotted this mark as well and again confused the trail by marking many other doors with the same red symbol.

After the second failure cost another thief his life, the leader decided to handle the matter personally. He had the old cobbler guide him to Ali Baba’s house, but instead of marking it, he studied it carefully until he was certain he could recognize it again. Then he developed a more elaborate plan.

The leader disguised himself as a merchant and purchased thirty-eight large oil jars, filling one with oil and hiding one of his men inside each of the other thirty-seven. He loaded the jars onto mules and made his way to Ali Baba’s house just as evening was approaching.

“Peace be upon you, brother,” the disguised leader called out as Ali Baba returned from the market. “I am a merchant traveling to the city to sell oil, but darkness has caught me still far from the caravanserai. Might I beg your hospitality for the night? I can pay well for the privilege.”

Ali Baba, whose generous nature had not been diminished by his recent trials, immediately agreed. “You are welcome in my house, friend. Come, bring your goods into the courtyard where they will be safe, and join my family for our evening meal.”

As the false merchant supervised the unloading of his deadly cargo, he whispered to each jar as he passed: “When you hear my signal in the night—the call of a night bird three times—emerge silently and follow my lead. We will end this threat to our brotherhood once and for all.”

Morgiana, ever watchful, noticed the merchant’s behavior and found something suspicious about his manner. Oil merchants, in her experience, were jovial folk who spoke freely about their wares and their travels. This man was too watchful, too controlled, and his eyes held a hardness that reminded her of dangerous men she had encountered in her youth.

Late that night, as the household slept, Morgiana found herself unable to rest. Something about their guest troubled her deeply, and she decided to investigate further. Needing oil for the kitchen lamp, she approached the guest’s jars, intending to borrow a small amount from what appeared to be an abundant supply.

As she lifted the cover of the first jar, she nearly cried out in shock. Instead of oil, she found herself looking into the eyes of a man crouched inside the jar, a knife gleaming in his hand. “Is it time?” the hidden thief whispered, mistaking her for his leader.

Morgiana’s quick thinking saved them all. “Not yet,” she whispered back, mimicking the leader’s voice as best she could. “Wait for the signal.” Moving quickly from jar to jar, she received the same whispered question from each hidden thief and gave the same response.

Understanding immediately that thirty-seven assassins were hidden in their courtyard, Morgiana knew she had to act swiftly and decisively. She went to the kitchen and began heating a large cauldron of oil, working as quietly as possible. When the oil was boiling, she carefully poured a generous amount into each jar, eliminating the hidden threat without raising an alarm.

The false merchant, waiting in his room for the right moment to signal his men, grew restless as the night wore on. Finally, he crept down to the courtyard to check on his companions, only to discover that his elaborate plan had failed completely. All thirty-seven of his men were dead, and he realized that somehow their presence had been detected.

With his followers dead and his identity likely compromised, the leader had no choice but to flee immediately. He climbed over the courtyard wall and escaped into the night, but he vowed that this would not be the end of his quest for revenge.

The next morning, Morgiana revealed the night’s events to Ali Baba, showing him the deadly contents of the oil jars. Ali Baba was amazed by her quick thinking and courage. “Morgiana,” he said gratefully, “you have saved not only my life but the lives of my entire family. How can I ever repay such a debt?”

“I am glad to serve the family that has shown me kindness,” Morgiana replied modestly, “but we must remain vigilant. The leader of these thieves escaped, and he will not abandon his quest for revenge easily.”

Indeed, the surviving thief leader spent months planning his final assault on Ali Baba’s household. He established himself in the city as a merchant, gradually building relationships and gathering information about his target. Through careful inquiry, he learned that Ali Baba’s son had recently returned from his travels and was establishing himself in the cloth trade.

The thief leader set up a shop near the young man’s business and began cultivating a friendship with him. He was a skilled actor, and over time, Ali Baba’s son came to regard him as a trusted friend and business partner. “Father,” the young man said one evening, “I would like to invite my new friend to dine with us. He has shown me great kindness in business matters.”

Ali Baba agreed, always pleased to welcome his son’s friends. But when the guest arrived for dinner, Morgiana immediately recognized him despite his disguise. She had memorized every detail of his face during their previous encounters, and no false beard or change of clothing could fool her sharp eyes.

During the meal, Morgiana noticed that the guest politely declined to eat the salted meat, claiming a dietary restriction that prevented him from consuming salt in another man’s house. This confirmed her suspicions, as she knew that according to Arabian custom, a man who ate salt in someone’s home was bound by sacred law not to harm his host. By refusing the salt, the false merchant was preserving his freedom to commit murder.

After dinner, Morgiana requested permission to entertain the guests with a dance, a performance art in which she was particularly skilled. Ali Baba agreed, always proud of Morgiana’s many talents, and she began to dance with a dagger in her hand, a traditional element of the performance.

As she danced closer and closer to the disguised thief leader, Morgiana saw him reach beneath his robes for the concealed knife he carried. In one swift, decisive movement, she plunged her dagger into his heart, ending his life and his threat to the family forever.

Ali Baba’s son cried out in shock, “Morgiana! What have you done? You have killed my friend!”

But when they searched the dead man’s body, they found the hidden weapons and documents that revealed his true identity as the leader of the forty thieves. Ali Baba embraced Morgiana with tears of gratitude in his eyes. “Three times you have saved our lives,” he said. “You are no longer a slave in this household—you are family.”

True to his word, Ali Baba formally freed Morgiana and arranged for her to marry his son, who had come to admire her intelligence and courage as much as her beauty. The wedding was a celebration of love triumphing over danger, and the couple’s happiness was a joy to all who witnessed it.

With the last of the forty thieves dead, Ali Baba was finally free to enjoy the treasure he had discovered without fear of retribution. But he used the wealth wisely, sharing it generously with those in need and establishing himself as a respected merchant and benefactor. He never forgot the lessons of his adventure—that greed leads to destruction, that cleverness and courage are more valuable than gold, and that true wealth lies in the love and loyalty of family and friends.

The secret of the treasure cave died with the forty thieves, but Ali Baba’s descendants prospered for many generations, always remembering the story of how a poor woodcutter’s honesty and a clever slave girl’s courage triumphed over the greed and violence of those who would take what was not rightfully theirs.

And it was said that in later years, when Ali Baba’s hair had turned white and his step had slowed, he would sometimes take his grandchildren to visit the forest where his adventure had begun, and there he would tell them the complete story of the forty thieves, teaching them that while treasure may be found by chance, true happiness must be earned through virtue, wisdom, and care for others.

Rate this story:

Comments

comments powered by Disqus

Similar Stories

Aladdin and the Magic Lamp

Story illustration

In the bustling city of Baghdad, during the reign of one of the Caliphs, there lived a poor tailor named Mustafa. Though his hands were skilled with needle and thread, fortune had never smiled upon his humble household. His greatest treasure was his son, Aladdin, a boy whose bright eyes sparkled with mischief but whose heart was good and true.

Mustafa worked tirelessly from dawn until dusk, hunched over his simple wooden table, stitching garments for the wealthy merchants who barely acknowledged his existence. “My son,” he would say to Aladdin each evening, his fingers cramped from the day’s labor, “learn a trade, for without skill, a man is like a ship without a sail.” But Aladdin, barely fifteen and full of youthful restlessness, preferred to roam the markets and listen to the storytellers rather than sit still with needle and thread.

Read Story →

The King of the Golden Mountain

Story illustration

In a prosperous trading city by the sea, there lived a wealthy merchant named Heinrich whose ships sailed to distant lands, bringing back exotic goods and precious treasures. Heinrich had everything a man could want—riches, respect, and a beautiful wife who had given him a son. But as fate would have it, his prosperity was built on foundations more fragile than he realized.

When his son, Friedrich, was twelve years old, disaster struck the merchant’s business. A series of terrible storms sank three of his ships, pirates captured two others, and his most trusted business partner fled with a fortune in gold, leaving Heinrich bankrupt and ruined.

Read Story →

The Seven Voyages of Sinbad the Sailor

Story illustration

In the great city of Baghdad, during the golden age of the Abbasid Caliphate, there lived a young man named Sinbad, the son of a wealthy merchant. When his father died, leaving him a considerable inheritance, young Sinbad found himself torn between the comfortable life of a city merchant and an irresistible longing for adventure that seemed to call to him from beyond the horizon.

“The world is vast,” Sinbad would say to himself as he gazed toward the river that led to distant seas, “and life is short. What stories might the winds and waves tell to one brave enough to listen?” Against the advice of his more cautious friends, Sinbad sold much of his inheritance, purchased goods suitable for trade, and set sail on his first voyage.

Read Story →