In a town in Persia there dwelt two brothers, one named Cassim, the other Ali Baba. Cassim was married to a rich wife and lived in plenty, while Ali Baba had to maintain his wife and children by cutting wood in a neighbouring forest and selling it in the town.
One day, when Ali Baba was in the forest, he saw a troop of men on horseback, coming toward him in a cloud of dust. He was afraid they were bandits, and climbed into a tree for safety. When they came up to him and dismounted, he counted forty of them. They unbridled their horses and tied them to the trees.
The finest man among them, whom Ali Baba took to be their captain, went a little way among some bushes, and said, "Open, Sesame!" so plainly that Ali Baba heard him.
A door opened in the rocks, and having made the troop go in, he followed them, and the door shut again of itself. They stayed some time inside, and Ali Baba, fearing they might come out and catch him, was forced to sit patiently in the tree. At last the door opened again, and the Forty Thieves came out. As the Captain went in last he came out first, and made them all pass by him; he then closed the door, saying, "Shut, Sesame!"
Every man bridled his horse and mounted, the Captain put himself at their head, and they returned as they came.
Then Ali Baba climbed down and went to the door concealed among the bushes, and said, "Open, Sesame!" and it flew open.
Ali Baba, who expected a dull, dismal place, was greatly surprised to find it large and well lighted, hollowed by the hand of man in the form of a vault, which received the light from an opening in the ceiling. He saw rich bales of merchandise -- silk, stuff-brocades, all piled together, and gold and silver in heaps, and money in leather purses. He went in and the door shut behind him. He did not look at the silver, but brought out as many bags of gold as he thought his asses, which were browsing outside, could carry, loaded them with the bags, and hid it all with fagots.
Using the words, "Shut, Sesame!" he closed the door and went home.
Then he drove his asses into the yard, shut the gates, carried the money-bags to his wife, and emptied them out before her. He bade her keep the secret, and he would go and bury the gold.
"Let me first measure it," said his wife. "I will go borrow a measure of someone, while you dig the hole."
So she ran to the Cassim's and borrowed a measure. Knowing Ali Baba's poverty, the sister was curious to find out what sort of grain his wife wished to measure, and artfully put some suet at the bottom of the measure. Ali Baba's wife went home and set the measure on the heap of gold, and filled it and emptied it often, to her great content. She then carried it back to her sister, without noticing that a piece of gold was sticking to it, which Cassim's wife perceived directly her back was turned.
She grew very curious, and said to Cassim when he came home, "Cassim, your brother is richer than you. He does not count his money, he measures it."
He begged her to explain this riddle, which she did by showing him the piece of money and telling him where she found it. Then Cassim grew so envious that he could not sleep, and went to his brother in the morning before sunrise. "Ali Baba," he said, showing him the gold piece, "you pretend to be poor and yet you measure gold."
By this Ali Baba perceived that through his wife's folly Cassim and his wife knew their secret, so he confessed all and offered Cassim a share.
"That I expect," said Cassim; "but I must know where to find the treasure, otherwise I will discover all, and you will lose all."
Ali Baba, more out of kindness than fear, told him of the cave, and the very words to use. Cassim left Ali Baba, meaning to be beforehand with him and get the treasure for himself. He rose early next morning, and set out with ten mules loaded with great chests. He soon found the place, and the door in the rock.
He said, "Open, Sesame!" and the door opened and shut behind him. He could have feasted his eyes all day on the treasures, but he now hastened to gather together as much of it as possible; but when he was ready to go he could not remember what to say for thinking of his great riches. Instead of "Sesame," he said, "Open, Barley!" and the door remained fast. He named several different sorts of grain, all but the right one, and the door still stuck fast. He was so frightened at the danger he was in that he had as much forgotten the word as if he had never heard it.
About noon the robbers returned to their cave, and saw Cassim's mules roving about with great chests on their backs. This gave them the alarm; they drew their sabers, and went to the door, which opened on their Captain's saying, "Open, Sesame!"
Cassim, who had heard the trampling of their horses' feet, resolved to sell his life dearly, so when the door opened he leaped out and threw the Captain down. In vain, however, for the robbers with their sabers soon killed him. On entering the cave they saw all the bags laid ready, and could not imagine how anyone had got in without knowing their secret. They cut Cassim's body into four quarters, and nailed them up inside the cave, in order to frighten anyone who should venture in, and went away in search of more treasure.
As night drew on Cassim's wife grew very uneasy, and ran to her brother-in-law, and told him where her husband had gone. Ali Baba did his best to comfort her, and set out to the forest in search of Cassim. The first thing he saw on entering the cave was his dead brother. Full of horror, he put the body on one of his asses, and bags of gold on the other two, and, covering all with some fagots, returned home. He drove the two asses laden with gold into his own yard, and led the other to Cassim's house.
The door was opened by the slave Morgiana, whom he knew to be both brave and cunning. Unloading the ass, he said to her, "This is the body of your master, who has been murdered, but whom we must bury as though he had died in his bed. I will speak with you again, but now tell your mistress I am come."
The wife of Cassim, on learning the fate of her husband, broke out into cries and tears, but Ali Baba offered to take her to live with him and his wife if she would promise to keep his counsel and leave everything to Morgiana; whereupon she agreed, and dried her eyes.
Morgiana, meanwhile, sought an apothecary and asked him for some lozenges. "My poor master," she said, "can neither eat nor speak, and no one knows what his distemper is." She carried home the lozenges and returned next day weeping, and asked for an essence only given to those just about to die.
Thus, in the evening, no one was surprised to hear the wretched shrieks and cries of Cassim's wife and Morgiana, telling everyone that Cassim was dead.
The day after Morgiana went to an old cobbler near the gates of the town who opened his stall early, put a piece of gold in his hand, and bade him follow her with his needle and thread. Having bound his eyes with a handkerchief, she took him to the room where the body lay, pulled off the bandage, and bade him sew the quarters together, after which she covered his eyes again and led him home. Then they buried Cassim, and Morgiana his slave followed him to the grave, weeping and tearing her hair, while Cassim's wife stayed at home uttering lamentable cries. Next day she went to live with Ali Baba, who gave Cassim's shop to his eldest son.
The Forty Thieves, on their return to the cave, were much astonished to find Cassim's body gone and some of their money-bags.
"We are certainly discovered," said the Captain, "and shall be undone if we cannot find out who it is that knows our secret. Two men must have known it; we have killed one, we must now find the other. To this end one of you who is bold and artful must go into the city dressed as a traveler, and discover whom we have killed, and whether men talk of the strange manner of his death. If the messenger fails he must lose his life, lest we be betrayed."
One of the thieves started up and offered to do this, and after the rest had highly commended him for his bravery he disguised himself, and happened to enter the town at daybreak, just by Baba Mustapha's stall. The thief bade him good-day, saying, "Honest man, how can you possibly see to stitch at your age?"
"Old as I am," replied the cobbler, "I have very good eyes, and will you believe me when I tell you that I sewed a dead body together in a place where I had less light than I have now."