Thematic study

David and the Two Disputants: A Judge Put to the Test

A study of the little-known Quranic scene in Surah 38 where two disputants climb into David's sanctuary and test his judgment, together with the surrounding passages on David as prophet, king, and repentant servant.

Of all the stories the Quran tells about the prophets, one of the most surprising is also one of the shortest. One evening, two men climb over the wall of David's sanctuary and walk straight into his prayer room. They have a quarrel to settle, and they want the king himself to judge it. The scene, told in just a few verses of Surah 38, turns David from a distant figure of history into a real person caught off guard — a judge who suddenly discovers that the trial was meant for him too.

A prophet in the roll of the messengers

David appears throughout the Quran not as a fragmentary character but as part of a continuous chain of revelation. He is named among the messengers God favored: "We gave him Isaac and Jacob... and We gave to David and Solomon and Job" [], and again in a long list of those guided aright []. The Quran also tells us that the Israelites of his time were fighting for their cause, and that David killed Goliath, after which God gave him kingship and wisdom []. Before we can understand the scene with the two disputants, we need this wider frame: David is both prophet and king, a man whose whole life is meant to model just authority.

A gift of voice and metal

The Quran emphasizes the gifts David received. God made the mountains and the birds join him in praise [], softened iron for him so that he could make armor [], and subjected the winds to Solomon and to David as a favor []. These passages show a man whose greatness came entirely from God, not from himself. That humility is precisely what will be tested when the two strangers climb over his wall.

The night the wall was climbed

The heart of our theme is the short narrative []. Two disputants — the Arabic key word is khasmān, the dual form of khasm, meaning two adversaries in a lawsuit — leap over the wall into David's sanctuary. David is frightened. They explain that they only want him to judge (yaḍḥā, from ḍaḥā, to decide) between them with fairness. One of them tells a story: the other has ninety-nine sheep and he has one, yet he wants to take even that one. David, without asking any questions, declares that the man has wronged his companion by adding him to his own sheep.

The turn of the story

Then comes one of the most striking moments in the Quran. Just as David finishes his judgment, the two men vanish, and David understands: "This is a trial from your Lord" []. The key word is fitna, a test or temptation — in Arabic بِرِيحَةٍ مِّن رَّبِّكَ, literally a trial from your Lord. Most commentators understand that the story was about David himself, though the Quran never spells out exactly what it referred to; it is honest to say this detail is debated. What the text clearly says is that David recognized his error, asked forgiveness (istaghfara, the standard Arabic verb for seeking God's pardon), bowed down, and turned back to God []. The trial was not for the two men; it was for the judge.

Forgiveness received and authority renewed

Immediately after the scene, the Quran returns to the voice of God: "O David, We have made you a deputy on the earth, so judge between people in truth" []. The Arabic word is khalīfa, a deputy or trustee — the same word used for humanity's role on earth in []. The verse continues with a warning against following desire, lest it lead one astray from God's path. In other words, the test did not end David's mission; it purified it. He is also described elsewhere as awwāb, one who constantly turns back to God [], which perfectly matches the repentance shown in [].

Justice as the very heart of David's mission

The two-disputants story is, at its core, about ḥukm — judgment. The same idea appears in the parallel passages about David and Solomon. When two quarreling men once climbed into the presence of David and Solomon, it was the young Solomon who proposed a way to settle the case, and God let David understand the right answer []. The Quran says both were given knowledge and judgment, "and We made Solomon and David understand it" []. Judgment, in these texts, is not a cold legal exercise; it is a form of understanding granted by God and tested in experience.

The Psalms in the Quran

Alongside wisdom and kingship, David received a scripture: "To David We gave the Zabūr" [], the Psalms. The Quran calls him "servant of God" (ʿabduhu) in connection with this gift [], and says the mountains and birds echoed his praise together with him [], just before the two disputants arrive in the narrative. The Quran also quotes the Zabur when it promises that the righteous will inherit the earth []. So David carries three titles at once: servant, king, and bearer of scripture — and the trial of [] touches all three.

A blessing meant for the family

The Quran presents the gifts of prophecy and judgment as a blessing that passes through a whole household: the family of David is told to act thankfully, "for few of My servants are grateful" []. David and Solomon are said to have been given favor among a people, and to have been among the grateful []. When David passes his judgment in Surah 38, he is carrying a trust that his son will inherit, and the trial proves that the trust rests not on perfection but on repentance.

Hardship, iron, and the making of a judge

It is worth noticing that the Quran never hides the difficulty of David's life. He fought Goliath at great risk [], and in a later passage God "forgave him what had passed" and made him draw near []. The softened iron he worked with [] stands as an image of the whole vocation: raw material shaped into something protective. A judge, too, must be shaped — and the two disputants were the fire in which David's judgment was refined.

What the story asks of the reader

Read on its own, the scene is almost cinematic: darkness, a wall, two strangers, a frightened king, a story about sheep, and then silence. Its lesson is simple enough for a young reader and deep enough for a scholar: even the best judge can judge wrongly when he is hurried or partial, and even the greatest person must be ready to admit error and turn back. David's greatness in the Quran lies less in never falling than in how fast he fell into repentance. That is why, at the very end of the surrounding passage, he is counted among those God chose and made righteous []. The two disputants tested the judge; the judge tested himself; and the story has tested every reader of it ever since.

The story of David and the two disputants is one of the Quran's most condensed masterpieces of narrative: a single evening in which a king learns humility, a prophet learns mercy, and a servant learns that his Lord is always ready to forgive. Read together with the other Davidic passages, it offers a portrait of authority that begins and ends with turning back to God.

Cited verses