In a town in Persia lived two brothers named Cassim and Ali Baba, between whom their father at his death had left what little property he possessed equally divided. Cassim, however, having married the heiress of a rich merchant, became soon after his marriage the owner of a fine shop, together with several pieces of land, and was in consequence, through no effort of his own, the most considerable merchant in the town. Ali Baba, on the other hand, was married to one as poor as himself, and having no other means of gaining a livelihood he used to go every day into the forest to cut wood, and lading therewith the three asses which were his sole stock-in-trade, would then hawk it about the streets for sale.
One day while he was at work within the skirts of the forest, Ali Baba saw advancing towards him across the open a large company of horsemen, and fearing from their appearance that they might be robbers, he left his asses to their own devices and sought safety for himself in the lower branches of a large tree which grew in the close overshadowing of a precipitous rock.
Almost immediately it became evident that this very rock was the goal toward which the troop was bound, for having arrived they alighted instantly from their horses, and took down each man of them a sack which seemed by its weight and form to be filled with gold. There could no longer be any doubt that they were robbers. Ali Baba counted forty of them.
Just as he had done so, the one nearest to him, who seemed to be their chief, advanced toward the rock, and in a low but distinct voice uttered the two words, 'Open, Sesame!' Immediately the rock opened like a door, the captain and his men passed in, and the rock closed behind them.
Their chief in a low but distinct voice uttered the two words "Open Sesame."
For a long while Ali Baba waited, not daring to descend from his hiding-place lest they should come out and catch him in the act; but at last, when the waiting had grown almost unbearable, his patience was rewarded, the door in the rock opened, and out came the forty men, their captain leading them. When the last of them was through, 'Shut, Sesame!' said the captain, and immediately the face of the rock closed together as before. Then they all mounted their horses and rode away.
As soon as he felt sure that they were not returning, Ali Baba came down from the tree and made his way at once to that part of the rock where he had seen the captain and his men enter. And there at the word 'Open, Sesame!' a door suddenly revealed itself and opened.
Ali Baba had expected to find a dark and gloomy cavern. Great was his astonishment therefore when he perceived a spacious and vaulted chamber lighted from above through a fissure in the rock; and there spread out before him lay treasures in profusion, bales of merchandise, silks, carpets, brocades, and above all gold and silver lying in loose heaps or in sacks piled one upon another. He did not take long to consider what he should do. Disregarding the silver and the gold that lay loose, he brought to the mouth of the cave as many sacks of gold as he thought his three asses might carry; and having loaded them on and covered them with wood so that they might not be seen, he closed the rock by the utterance of the magic words which he had learned, and departed for the town, a well-satisfied man.
When he got home he drove his asses into a small court, and shutting the gates carefully he took off the wood that covered the bags and carried them in to his wife. She, discovering them to be full of gold, feared that her husband had stolen them, and began sorrowfully to reproach him; but Ali Baba soon put her mind at rest on that score, and having poured all the gold into a great heap upon the floor he sat down at her side to consider how well it looked.
Soon his wife, poor careful body, must needs begin counting it over piece by piece. Ali Baba let her go on for awhile, but before long the sight set him laughing. 'Wife,' said he, 'you will never make an end of it that way. The best thing to do is to dig a hole and bury it, then we shall be sure that it is not slipping through our fingers.' 'That will do well enough,' said his wife, 'but it would be better first to have the measure of it. So while you dig the hole I will go round to Cassim's and borrow a measure small enough to give us an exact reckoning. 'Do as you will,' answered her husband, 'but see that you keep the thing secret.'
Off went Ali Baba's wife to her brother-in-law's house. Cassim was from home, so she begged of his wife the loan of a small measure, naming for choice the smallest. This set the sister-in-law wondering. Knowing Ali Baba's poverty she was all the more curious to find out for what kind of grain so small a measure could be needed. So before bringing it she covered all the bottom with lard, and giving it to Ali Baba's wife told her to be sure and be quick in returning it. The other, promising to restore it punctually, made haste to get home; and there finding the hole dug for its reception she started to measure the money into it. First she set the measure upon the heap, then she filled it, then she carried it to the hole; and so she continued till the last measure was counted. Then, leaving Ali Baba to finish the burying, she carried back the measure with all haste to her sister-in-law, returning thanks for the loan.
Ali Baba departed for the town a well satisfied man.
No sooner was her back turned than Cassim's wife looked at the bottom of the measure, and there to her astonishment she saw sticking to the lard a gold coin. 'What?' she cried, her heart filled with envy, 'is Ali Baba so rich that he needs a measure for his gold? Where, then, I would know, has the miserable wretch obtained it?'