Marouf, a poor cobbler in Cairo, flees his sharp-tongued wife, Fatima, and sleeps in a deserted spot. A genie appears and transports him to a distant city, introducing him as Shah Bandar, Egypt’s richest merchant. Marouf wins the townspeople’s affection, marries the king’s daughter, and, after the king’s death, becomes a just and generous ruler.