Ma'aruf the cobbler and his wife Fatimah live in Cairo.He meets an old friend, Ali, who has built a business from pretending to be a wealthy merchant, and wants to help Ma'aruf do the same.She tells him to run away, and tells the King that the baggage train was attacked by robbers and Ma'aruf had to go look after it. Ma'aruf begins to work in the fields for a ploughman, and finds a stairway into the ground, within which is treasure and a seal-ring containing a Jinn.The cobbler distributes his treasure to people throughout the city, but the King and Vizier think it strange that a merchant only gives money away and never sells anything.He steals the ring, sends Ma'aruf and the King away to starve, makes himself Sultan, and attempts to marry Dunya.However, Fatimah has also complained to another Kazi and to the High Court, so Ma'aruf flees to another city.The King eventually offers to wed Ma'aruf to his daughter Dunya.She complains about him and has him arrested.