A once rich man dreams he must go to Cairo to get his fortune. In Cairo he sleeps in a mosque and is beaten. He relates the story to the Wali who tells him he also had a dream in which was said fortune was to be gained from a certain house in Baghdad. The man from Baghdad returns to his city and finds out the described house is his own. He discovers a great treasure at the described place.
A once rich man earns his living by hard labour. One night he has a dream where a Speaker tells him to go to Cairo where his fortune lies which he does. He sleeps in a mosque through which Allah sends bandits who go into an adjoining house. The owners are awakened and the Chief of Police with his officers come to their aid. They find the man in the mosque, beat him and throw him into jail.
The man explains his story and the Wali says he has a lot of wit. The Wali also had thrice a dream in which one said that there is a house in Baghdad in such district in such fashion and in its courtyard underneath a jetting-fountain is a great sum of money. Then he gives the man some money to go back to Baghdad where the man finds out the described house is his own and he discovers a great treasure there.