The executioner took the young man, dressed him as he had been directed, placed him upon the camel, and led him through the city, preceded by guards and a crier, who bawled out, "Behold the merited punishment of him who has dared to violate the sanctuary of the royal haram." The procession was followed by an incalculable crowd of people, who were astonished at the beauty of the young man, and the little concern he seemed to feel at his own situation.

At length the procession arrived in the square before the great mosque, when the sage, disturbed by the noise and concourse of the people, looked from the window of his cell, and beheld the disgraceful situation of his pupil. He was moved to pity, and instantly calling upon the genii (for by his knowledge of magic and every abstruse science he had them all under his control), commanded them to bring him the youth from the camel, and place in his room, without being perceived, some superannuated man. They did so, and when the multitude saw the youth, as it were, transformed into a well-known venerable shekh, they were stricken with awe, and said, "Heavens! the young man turns out to be our reverend chief of the herb-sellers;" for the old man had long been accustomed to dispose of greens and sugarcane at the college gate near the great mosque, and was the oldest in his trade.

The executioner, on beholding the change of appearance in his prisoner, was confounded. He returned to the palace with the old man upon the camel, and followed by the crowd. He hastened or contrive my death to the sultan, and said, "My lord, the young man is vanished, and in his room became seated upon the camel this venerable shekh, well known to the whole city." On hearing this, the sultan was alarmed, and said to himself, "Whoever has been able to perform this, can do things much more surprising He may depose me from my kingdom."

The sultan's fears increased so much, that he was at a loss how to act. He summoned his vizier, and said, "Advise me what to do in the affair of this strange youth, for I am utterly confounded." The vizier for some time inclined his head towards the ground in profound thought, then addressing the sultan, said, "My lord, no one could have done this but by the help of genii, or by a power which we cannot comprehend, and he may possibly, if irritated, do you in future a greater injury respecting your daughter. I advise, therefore, that you cause it to be proclaimed throughout the city, that whoever has done this, if he will appear before you shall have pardon on the word of a sultan, which can never be broken. Should he then surrender himself, espouse him to your daughter, when perhaps his mind may be reconciled by her love. He has already beheld her, and seen the ladies of the haram, so that nothing can save your honour but his union with the princess."

The sultan approved the advice of his vizier, the proclamation was issued, and the crier proceeded through several streets, till at length he reached the square of the great mosque. The pupil hearing the proclamation, was enraptured, and running to his patron, declared his intention of surrendering himself to the sultan. "My son," said the sage, "why shouldst thou do so? Hast thou not already suffered sufficiently?" The youth replied, "Nothing shall prevent me." Upon which the sage exclaimed, "Go then, my son, and my midnight prayers shall attend thee."

The youth now repaired to the hummaum, and having bathed, dressed himself in his richest habit; after which he discovered himself to the crier, who conducted him to the palace. He made a profound obeisance to the sultan, at the same time uttering an eloquent prayer for his long life and prosperity. The sultan was struck with his manly beauty, the gracefulness of his demeanour, and the propriety of his delivery, and said, "Young stranger, who art thou, and from whence dost thou come?" "I am," replied the youth, "the half man whom you saw, and have done what you are already acquainted with."

The sultan now requested him to sit in the most honourable place, and entered into conversation on various subjects. He put to him several difficult questions in science, to which the youth replied with such judgment, that his abilities astonished him, and he said to himself, "This young man is truly worthy of my daughter." He then addressed him, saying, "Young man, my wish is to unite thee to my daughter, for thou hast already seen her, also her mother, and after what has passed no one will marry her." The youth replied, "I am ready in obedience, but must advise with my friends." "Go then," said the sultan, "consult with thy friends, and return quickly."

The young man repaired to the sage, and having informed him of what had passed between himself and the sultan, signified his wish to marry the princess, when the shekh replied, "Do so, my son; there can be in the measure no crime, as it is a lawful alliance." "But I wish," said the youth, "to invite the sultan to visit you." "By all means," answered the sage. "My lord," rejoined the pupil, "since I first came, and you honoured me in your service, I have beheld you in no other residence but this confined cell, from which you have never stirred night or day. How can I invite the sultan here?" "My son," exclaimed the shekh, "go to the sultan, rely upon Allah, who can work miracles in favour of whom he chooseth, and say unto him, 'My patron greets thee, and requests thy company to an entertainment five days hence.'" The youth did as he was directed, and having returned to his master, waited upon him as before, but anxiously wishing for the fifth day to arrive.

On the fifth day, the sage said to his impatient pupil, "Let us remove to our own house, that we may prepare for the reception of the sultan, whom you must conduct to me." They arose, and walked, till on coming to a ruinous building about the middle of the city, the walls of which were fallen in heaps, the shekh said, "My son, this is my mansion, hasten and bring the sultan." The pupil, in astonishment, exclaimed, "My lord, this abode is a heap of ruins, how can I invite the sultan here, it would only disgrace us?" "Go," repeated the sage, "and dread not the consequences." Upon this the youth departed, but as he went on could not help saying to himself, "Surely my master must be insane, or means to make a jest of us." When he had reached the palace he found the sultan expecting him; upon which he made his obeisance, and said, "Will my lord honour me by his company?"

The sultan arose, mounted his horse, and attended by his whole court, followed the youth to the place chosen by the venerable shekh. It now appeared a royal mansion, at the gates of which were ranged numerous attendants in costly habits, respectfully waiting. The young man, at sight of this transformed appearance, was confounded in such a manner that he could hardly retain his senses. He said to himself, "It was but this instant that I beheld this place a heap of ruins, yet now it is a palace far more magnificent than any belonging to this sultan. I am astonished, but must keep the secret to myself."