This section is from the book "Stories From The Thousand And One Nights", by Edward William Lane and Stanley Lanepoole. Also available from Amazon: Stories From Thousand And One Nights: The Arabian Nights' Entertainments.
And when 'Ala-ed-Din could not get at the Lamp to give it to his uncle, the Moor, the impostor, he became frantic at not gaining his desire, though 'Ala-ed-Din had promised to give it him without guile or deceit as soon as he got out of the cave. But when the Moor saw that 'Ala-ed-Din would not give him the Lamp, he was furiously enraged and gave up all hope of getting it. So he muttered incantations and threw incense into the fire, and immediately the slab shut of itself and by the power of magic became closed, the earth buried the stone as heretofore, and 'Ala-ed-Din remained under the ground unable to come forth. For this sorcerer, as we have related, was a stranger and no uncle of 'Ala-ed-Din's; but he misrepresented himself and asserted a lie, in order to gain possession of this Lamp by means of the youth.
So the accursed Moor heaped the earth over him and left him, for whose sake this treasure had been preserved, to die. of hunger. For this damnable Moorish sorcerer was from the land of Africa, from the inner Westland, and from his youth he had practised sorcery and all magic arts (the City of Africa [in Barbary] is well known for all these mysteries), and he ceased not to study and learn from his childhood in the City of Africa until he had mastered all the sciences. And one day, by his accomplished skill in sciences and knowledge, acquired in the course of forty years of sorcery and incantation, he discovered that in a remote city of China, called El-Karas, there was buried a vast treasure the like of which not one of the Kings of this world had ever amassed, and among this treasure was a Wonderful Lamp, which whoso possessed, mortal man could not excel him in estate or in riches, nor could the mightiest King upon earth attain to the opulence of this Lamp and its power and its potency. And when he discovered by his science and perceived that this treasure could only be obtained by means of a boy of the name of 'Ala-ed-Din, of poor family, and belonging to that city, and understood how it could thus be taken easily and without trouble, he straightway and without hesitation prepared to journey to China, as we have said, and did with 'Ala-ed-Din what he did, and imagined that he would gain possession of the Lamp. But his design and his hopes were frustrated and his labour was in vain. So he resolved to do 'Ala-ed-Din to death, and heaped the earth over him to the end that he might die, for "the living hath no murderer." Moreover, he resolved upon this, in order that 'Ala-ed-Din, as he could not get out, should not be able to bring up the Lamp from below ground. Then he went his way and returned to the regions of Africa, dejected in spirit and disappointed of his aim. Thus was it with the sorcerer.
But as for 'Ala-ed-Din, when the earth was heaped over him, he began to call to his uncle, the Moor, whom he believed to be such, to stretch out his hand, that he might come forth from the vault to the face of the earth; and he shouted, and no one answered him. Then he understood the trick which the Moor had played upon him, and that he was no uncle at all, but a lying magician. So 'Ala-ed-Din despaired of his life, and perceived to his grief that there remained to him no escape to the earth's surface, and he began to weep and bewail that which had befallen him.
But after awhile he arose and descended to see if God Most High would provide him a door of escape. And he went, turning to right and left, and found nothing but darkness, and four doors shut against him; for the sorcerer by his magic had closed all the doors, and had even shut that of the garden through which 'Ala-ed-Din had passed, so that he might not find there a door by which to escape to the surface of the earth, and thus to hasten his death. And 'Ala-ed-DuVs weeping increased and his wailing grew louder when he saw the doors all shut, and the garden also, where he had intended to console himself awhile; but he found everything closed, and he gave himself up to weeping and lamenting, like him who hath abandoned hope, and he returned and sat on the steps of the vault where he had first entered.
Thus he sat weeping and wailing and hopeless. But a small thing is it to God (extolled and exalted be he!) if he willeth a thing to say to it, "Be," and it is. Thus doth he create joy in the midst of woe; and thus was it with 'Ala-ed-Din. When the Moorish sorcerer sent him to the vault, he gave him a ring and put it on his finger, saying, "Verily this ring will guard thee from all danger if thou be in trouble and difficulties, and take away from thee all evils, and be thy helper wheresoever thou art." And this was by the decree of God Most High, that it should be the means of 'Ala-ed-Din's escape. For whilst he sat weeping and lamenting his case and abandoning his hope of life, overwhelmed with his misfortune, in his exceeding tribulation be began wringing his hands as the sorrowful are wont to do. And he raised his hands supplicating God, and saying; *I testify that there is no God but thee alone, the mighty, the omnipotent, the all-conquering, the quickener of the dead, creator of needs and fulfiller thereof, who dispellest troubles and anxieties and turnest them into joy.
Thou sufficest me, and thou art the best of protectors; and I testify that Mohammad is thy servant and apostle. O my God, by his favour with thee, release me from this calamity." And whilst he was supplicating God and wringing his hands from heaviness of grief at the calamity which had overtaken him, his hand happened to rub the ring, and, behold, im* mediately the Slave of the Ring appeared before him and cried: "Here I am, thy slave, between thy hands. Ask what thou wilt, for I am the slave of him on whose hand is the ring, the ring of my master." And 'Ala-ed-Din looked up and saw a Marid like the Jinn of our Lord Suleyman, standing before him; and he was affrighted at the awful apparition, until he heard the Slave of the Ring say: "Ask what thou wilt, for verily am I thy servant, because the ring of my master is on thy hand." So he recovered his spirit and called to mind the words of the Moor when he gave him the ring. And he rejoiced exceedingly and plucked up heart and said to him: "O Slave of the Ring, I wish thee to convey me to the surface of the earth." And hardly had he spoken when, behold, the earth gaped open and he found himself at the door of the Treasury, outside, in face of the world. And when 'Ala-ed-Din saw himself thus in face of the world, after being three days under ground sitting in the dark Treasury, and the light of day and the sunshine smote his face and he could not open his eyes for it, he began to open his eyelids little by little till his eyes were stronger and became accustomed to the light and recovered from the gloom.