The story revolves around Abu Numaas, a beloved servant of Caliph al-Rashid in 8th-century Baghdad. Abu seeks a loan to buy a donkey but is initially denied entry to the palace. He strikes a deal with a gatekeeper, promising to share half his reward. When asked why he wants a light beating, Abu reveals the agreement, leading to the gatekeeper receiving a similar punishment. The tale showcases fairness and consequences.