Harun al-Rashid has difficulty sleeping, and goes for a nighttime boat trip on the Tigris river with Ja'far the vizier, his brother al-Fadlr, Abu Nuwas the poet, Abu Dulaf the soldier, and Masrur the executioner. Hearing beautiful singing, they follow it to a house where a hundred slave girls sit. A weeping girl is the singer, singing a song of how she was separated from her lover. The master of the house seems distressed, and the caliph reveals himself and asks what's going on.
The master of the house reveals that he is from Oman and was once a merchant. He travelled to Baghdad and Basra, and met Tahir ibn al-‘Ala’, who kept a brothel. One night the merchant saw a lovely girl on the roof, Tahir's daughter. He spends the night with her as he has with the other women, for a hefty price of 500 dinars, but they fall in love. They keep up an affair in secret for a year before they are discovered and he is thrown out. He gets a new job as a secretary and eventually finds good fortune by selling an amulet, but when he returns to the house of Tahir with his money, he finds it in ruins and learns that Tahir has closed up shop because his daughter was so lovesick. After searching for Tahir for a long time, the merchant finally recently met him and was reunited with his lover. The caliph is then shown a beautiful boy, and rewards the merchant generously.