A man who was once rich must now work hard for a living. He has a dream telling him to go to Cairo to gain his fortune. As it happens, while sleeping in a mosque, he is mistaken for a bandit and thrown into jail. He tells his story to the Wali, who mentions that he once dreamed of a house in Baghdad where money was buried. He gives the man some money to return to Baghdad. Upon tracking down the house in the Wali's dream, the man realizes that it is his own house. He finds the treasure there.