When the sultan returned to his palace, he ordered his jewels to be brought out, and the jewellers took a great quantity, particularly those Aladdin had made him a present of, which they soon used, without making any great advance in their work. They came again several times for more, and in a month's time had not finished half their work. In short, they used all the jewels the sultan had, and borrowed of the vizier, but yet the work was not half done.

Aladdin, who knew that all the sultan's endeavours to make this window like the rest were in vain, sent for the jewellers and goldsmiths, and not only commanded them to desist from their work, but ordered them to undo what they had begun, and to carry all their jewels back to the sultan and to the vizier. They undid in a few hours what they had been six weeks about, and retired, leaving Aladdin alone in the hall. He took the lamp, which he carried about him, rubbed it, and presently the genie appeared. "Genie," said Aladdin, "I ordered thee to leave one of the four and twenty windows of this hall imperfect and thou hast executed my commands punctually; now I would have thee make it like the rest." The genie immediately disappeared. Aladdin went out of the hall, and returning soon after, found the window like the others.

In the meantime, the jewellers and goldsmiths repaired to the palace, and were introduced into the sultan's presence; where the chief jeweller, presenting the precious stones which he had brought back, said, in the name of all the rest: "Your majesty knows how long we have been upon the work you were pleased to set us about, in which we used all imaginable industry. It was far advanced, when Prince Aladdin commanded us not only to leave off, but to undo what we had already begun, and bring your majesty your jewels back." The sultan asked them if Aladdin had given them any reason for so doing, and they answering that he had given them none, he ordered a horse to be brought, which he mounted, and rode to his son-in-law's palace, with some few attendants on foot. When he came there, he alighted at the staircase, which led to the hall with the twenty-four windows, and went directly up to it, without giving previous notice to Aladdin; but it happened that at that very juncture Aladdin was opportunely there, and had just time to receive him at the door.

The sultan, without giving Aladdin time to complain obligingly of his not having given notice, that he might have acquitted himself with the more becoming respect, said to him: "Son, I come myself to know the reason why you commanded the jewellers to desist from work, and take to pieces what they had done."

Aladdin disguised the true reason, which was, that the sultan was not rich enough in jewels to be at so great an expense, but said: "I beg of you now to see if anything is wanting."

The sultan went directly to the window which was left imperfect, and when he found it like the rest, fancied that he was mistaken, examined the two windows on each side, and afterward all the four and twenty; but when he was convinced that the window which several workmen had been so long about was finished in so short a time, he embraced Aladdin, and kissed him between his eyes. "My son," said he, "what a man you are to do such surprising things always in the twinkling of an eye: there is not your fellow in the world; the more I know, the more I admire you."

Aladdin received these praises from the sultan with modesty, and replied in these words: "Sir, it is a great honour to me to deserve your majesty's goodwill and approbation, and I assure you, I shall study to deserve them more."

The sultan returned to his palace, but would not let Aladdin attend him. When he came there, he found his grand vizier waiting, to whom he related the wonder he had witnessed with the utmost admiration, and in such terms as left the minister no room to doubt but that the fact was as the sultan related it; though he was the more confirmed in his belief that Aladdin's palace was the effect of enchantment, as he had told the sultan the first moment he saw it. He was going to repeat the observation, but the sultan interrupted him, and said: "You told me so once before; I see, vizier, you have not forgotten your son's espousals to my daughter." The grand vizier plainly saw how much the sultan was prepossessed, therefore avoided disputes, and let him remain in his own opinion. The sultan as soon as he rose every morning went into the closet, to look at Aladdin's palace, and would go many times in a day to contemplate and admire it.

Aladdin did not confine himself in his palace; but took care to show himself once or twice a week in the town, by going sometimes to one mosque, and sometimes to another, to prayers; or to visit the grand vizier, who affected to pay his court to him on certain days; or to do the principal lords of the court the honour to return their visits after he had regaled them at his palace. Every time he went out, he caused two slaves, who walked by the side of his horse, to throw handfuls of money among the people as he passed through the streets and squares, which were generally on these occasions crowded. Besides, no one came to his palace gates to ask alms but returned satisfied with his liberality. In short, he so divided his time, that not a week passed but he went either once or twice a-hunting, sometimes in the environs of the city, sometimes farther off; at which time the villages through which he passed felt the effects of his generosity, which gained him the love and blessings of the people; and it was common for them to swear by his head. With all these good qualities he showed a zeal for the public good which could not be sufficiently applauded. He gave sufficient proofs of both in a revolt on the borders of the kingdom; for he no sooner understood that the sultan was levying an army to disperse the rebels than he begged the command of it, which he found not difficult to obtain. As soon as he was empowered, he marched with so much expedition, that the sultan heard of the defeat of the rebels before he had received an account of his son-in-law's arrival in the army.

Aladdin had conducted himself in this manner several years, when the African magician, who undesignedly had been the instrument of raising him to so high a pitch of prosperity, recalled him to his recollection in Africa, whither, after his expedition, he had returned. And though he was almost persuaded that Aladdin must have died miserably in the subterranean abode where he had left him, yet he had the curiosity to inform himself about his end with certainty; and as he was a great geomancer, he took out of a cupboard a square, covered box, which he used in his geomantic observations. After he had prepared and levelled the sand which was in it with an intention to discover whether or not Aladdin had died, he cast the points, drew the figures, and formed a horoscope, by which, when he came to examine it, he found that instead of dying in the cave, his victim had made his escape, lived splendidly, was in possession of the wonderful lamp, had married a princess, and was much honoured and respected.