That official, who in secret bore no good will to Aladdin, intimated his suspicion that the palace was built by magic, and that Aladdin had made this hunting expedition an excuse for the removal of his palace. The sultan sent a detachment of his guard to arrest Aladdin as a prisoner of state.
The vizier's plan was carried out, and Aladdin would have been put to death had not the people, whose affection he had earned by his generosity, urged the sultan to grant him life. As soon as Aladdin had gained his liberty, he addressed the sultan as follows:
"Sire, I pray you to let me know the crime by which I have thus lost the favor of your countenance."
"Your crime," answered the sultan, "wretched man! do you not know it?
Follow me and I will show you."
The sultan then took Aladdin into the apartment from whence his son- in-law's palace could best be seen, and said, "You ought to know where your palace stood; look from mine and tell me where it has gone."
Aladdin looked, and, utterly amazed, stood speechless. After recovering himself, he said, "It is true I do not see the palace, but I was not concerned in its removal. I beg you to give me forty days, and if in that time I cannot restore the palace, I will offer my head to be disposed of at your pleasure."
"I grant your petition," said the sultan, "but remember, at the end of forty days to present yourself before me."
Exceedingly humiliated, Aladdin went out of the sultan's palace, and the lords, who had courted him in his days of splendor, now refused to have any communication with him.
For three days he wandered about the city, exciting the wonder and compassion of the multitude by asking everybody he met if they had seen his palace, or could tell him anything of it. On the third day he wandered into the country, where he fell down the bank of a river in such a way, that while he was attempting to hold himself, he rubbed the ring which the magician had given him.
Instantly the same genie that he had seen in the cave appeared before him and said, "What wouldst thou? I and the other slaves of the ring serve him who wears it. I am ready to obey."