A poor man, urged by his wife and starving children, went to market to see what he could get. So he prayed, and prophet Elijah was sent by God, who told the man to sell him as a slave. The man was frightened, but Elijah re-assured him; he told him of the money received to give him one coin. The man sold him for 80 dinars, gave a coin to the prophet who returned it to him and told him, henceforth he would be very rich.

Elijah was brought as a slave to the king and was asked what he could do. Prophet said he was a builder. The king just then had bought slaves and all the material for building a new palace and promised the prophet freedom if he could finish the palace in six months or any time before. In the night prophet built the palace and disappeared.

He met the man who had sold him and told him that the king had profited a thousand times more from him than he had paid for him. He then told the man to thank God for the mercy shown to him.