Mashood, A. R. Tompel is a wealthy man who believes that happiness is a luxury only the rich can enjoy, and that he alone has the power to grant wealth and joy to those around him. Mashood has three daughters: Safura and Suhara, Mimi Loma, who share his life philosophy, and Mastura, Saloma, who does not and often clashes with him. To prove his point, he arranges marriages for his daughters to men from affluent families—Muharram and Safar—while Mastura is paired with a poor goatherder named Syawal, a choice Mashood assumes will fail to bring happiness.
Syawal, P. Ramlee, and Mastura lead a humble, contented life in a quiet village. One day, while Syawal is herding goats, one wanderer strays off and disappears into a cave. He follows and discovers a chest brimming with treasure. A djinn appears and informs him that the treasure belongs to Ahmad Albab, the only one who can claim it. Obeying the djinn, Syawal leaves without the riches, changing the course of his life.
Meanwhile, Muharram and Safar exhaust their wives’ dowries and steal from a jewelry shop. They lie to their wives, telling them the money came from a thriving business, and use the stolen funds to buy new goats to replace what Syawal had. This move pushes Syawal out of work just as Mastura secretly starts a small farm near their home, creating a new means of sustenance for the family.
Mashood’s birthday arrives, and he invites his daughters and their husbands to the celebration, demanding gifts as a sign of affection. Muharram and Safar present ostentatious offerings, which please Mashood. Mastura and Syawal present something far from gold: a simple packet of salt and sugar, which Mastura explains as a symbol of their love’s essential, unglamorous flavor. Mashood dismisses the idea, insisting that love should glitter like jewels and gold, yet he tolerates the demonstration. Mastura then presents a cooked meal, which Mashood finds tasteless because it’s missing salt and sugar, a metaphor Mastura uses to illustrate how even the most delicious dish can be spoiled without basic elements. He reluctantly acknowledges the message but warns that their trick won’t work the next year.
The families part ways, and Mastura soon has a baby boy. At first, the infant’s constant crying puzzles them, but after several exhausting attempts to pacify him, Mashood manages to quiet the baby by tapping on a door. He names the baby Ahmad Albab, deriving the name from the Arabic word for door, “Albab.” Syawal is stunned to hear the name and returns with Mastura to the djinn’s cave. The djinn sees Ahmad Albab and proclaims that all the treasure must belong to him, on the condition that Syawal brings the boy to the cave every full moon to play with the djinn’s wife and son. With this unusual arrangement, Syawal and Mastura suddenly acquire incredible wealth, yet they remain modest and generous, choosing to help those in need.
Back in the village, Muharram and Safar find themselves broke once more and attempt to rob the jewelry store again. The shop owner is prepared this time, and the pair are arrested. Safura and Suhara are told to seek out a kind-hearted man named Syawal who could bail them out, and they are astonished to discover that Syawal and Mastura have become wealthy. True to their nature, Syawal and Mastura bail out Muharram and Safar, sending them on their way free.
Yet Mashood’s birthday season returns, and the pressure to deliver gifts resurfaces. In a desperate bid, Muharram and Safar attempt to raid Syawal’s house again, but are caught. Despite the setback, Syawal agrees to provide Mashood with gifts for the celebration, keeping the peace within the family.
On the night of Mashood’s birthday, Safura and Suhara present Mashood with trays of precious jewels, which impress him. He then turns to Syawal and Mastura, asking for their gift. Syawal offers a model of a mosque, explaining that it stands as a reminder of God. Mashood nearly recoils at the austere present, but the truth comes out when Muharram and Safar break down and confess that they are thieves and that the jewels actually came from Syawal. He questions this claim until Syawal reveals a stunning white suit beneath his robes. Mashood’s posture shifts, and he suddenly extols Syawal as a superb son-in-law. Yet Syawal reminds him of the central lesson: true happiness and wealth are not guaranteed by wealth or cunning, but come from God, and good fortune is a matter of humility and virtue, not material gifts.
In the end, the tale champions a timeless moral: prosperity can come from humble beginnings and divine favor, and wealth divorced from righteousness does not bring lasting happiness.