David’s story in the Koran is a short one and is mostly contained in surah 38, whose title is three symbolic letters “Sâd”, the meaning of which is disputed by Islamic scholars and about which Fakhry is silent.
David is famous in the Bible for sleeping with the wife of a soldier in his army; then, when she becomes pregnant, arranging for her husband Uriah to be killed in battle. This is not mentioned in the Koran. In Allah’s revelations about the Prophets, they are all, not unlike the Pope, considered infallible in matters of faith. His Messengers are also mostly free from any sin, although, as in the story of David, Allah will forgive them for minor transgressions which are mainly in their own minds.
The story of David begins shortly after the Meccan audience, to whom the Prophet Muhammad is speaking, taunts him with a specious request that Allah hasten their share of the punishment.
38:16 They say (the Meccan unbelievers): “Our Lord, hasten for us our share before the Day of Reckoning.”
38:17 Bear patiently (O Muhammad) with what they say and remember Our Servant, David, the mighty one; he was a true penitent.
38:18 We have subjected the mountains together with him, to glorify in the evening and at daybreak;
38:19 And the birds were mustered; all obedient to him (David).
38:20 And we strengthened his kingdom and gave him wisdom and the decisive speech.
Two brothers will raid David’s sanctuary for the singular purpose of getting him to settle a dispute about ewes which even the densest, but morally aware individual, could have resolved. Fakhry in a footnote writes that the verses which follow are a “possible reference to Nathan’s report of a dispute he submitted to David. cf II, Samuel, 12.” The brothers, Allah labels enemies even if they have only called on David to resolve a dispute, revelation 38:21 and want to be guided “to the Straight Path”, revelation 38:22.
38:21 Have you heard the news of the enemy when they scaled the sanctuary?
38:22 When they entered upon David and he was afraid of them. They said: “Do not fear. We are two adversaries, one of us encroached on the other unjustly; so judge between us with justice and do not transgress, and guide us to the Straight Path.
38:23 “This is my brother, who has ninety-nine ewes and I have only one. So he said; ‘Let me take charge of it,’ and he overcame me in the argument.”
Was the owner of ninety-nine ewes within his rights? The answer is obvious, but David is worried that this is a test from Allah. Not taking any chances, he asks forgiveness from Allah after giving the correct answer.
38:24 He (David) said: “He has wronged you by asking for your ewe on top of his ewes. Indeed, many partners have encroached one on the other, except for those who believe and do the righteous deeds; and how few they are?” David thought that We had tried him, so he asked forgiveness from His Lord and fell down on his knees and repented.
Even if it was all in David’s head, Allah, of course, forgave him, because it would seem he has a close relationship with Allah. In the following revelation it almost seems as if Allah is doing what is often referred to as name-dropping.
38:25 So, We forgave him that. Indeed, he has a close relationship with Us and a fair recourse.
Be that as it may, Allah has a warning for David.
38:26 O David, We have appointed you a vicegerent on earth; so judge justly among men and do not follow your fancy, lest it lead you away from the Path of Allah. Indeed those who lead others away from the Path of Allah will have a terrible punishment, because they have forgotten the Day of Reckoning.
The part about David defeating Goliath is in verse 2:251 in the story of Saul.
David and Solomon Together
21:78 And David and Solomon, when they gave judgement, regarding the tillage, when the people’s sheep wandered therein by night; and We bore witness to their judgement.
There is no mention of this event in the Bible nor in the Jewish literature. According to the Muslim commentators, it happened like this: The goats of one person entered into the field of another person at night. The latter brought his complaint to Prophet David who decided that the strayed goats should be given to the owner of the field. Prophet Solomon, however, differed with this and opined that the goats should remain with the owner of the field up to the time that the former tilled and prepared the field as before. In regard to this Allah says, "We led Solomon to the right decision" (revelation 21:79). As regards the legal aspect of the matter we cannot say with certainty what is the Islamic law in such a case nor is there any Tradition of the Holy Prophet to explain or support it. That is why the jurists have differed about it.
I thought Allah was God! In revelation 21:79 why did Allah not say: “We subjected the mountains and the birds so as to glorify Me”?
21:79 And so We made Solomon understand it, and to each We gave judgment and knowledge. And with David, We subjected the mountains and the birds so as to glorify God; and that We accomplished.
21:80 And We taught him the craft of making coats of mail for you, so as to protect you from your own might. Are you, then, thankful?
21:81 And to Solomon We subjected the stormy wind blowing at his command towards the land which We have blessed, and We have knowledge of everything.
21:82 And some of the devils dived for him and did other work besides that and We were watching them.
It is difficult to imagine that the same deity is the inspiration for both the Psalms and the Koran. The style and tone are so different.
Allah mentions the Psalms on at least three occasions. The first is part of a trio of verses where He reminds His latest and last Prophet of all the Messengers who came before him and that he, Muhammad, is humanity’s last hope; after him “mankind will have no plea” against The Compassionate.
4:163 We have revealed to you, as We revealed to Noah and the Prophets after him. And We revealed to Abraham, Isma‘il, Isaac, Jacob and the Tribes; and to Jesus, Job, Jonah, Aaron and Salomon; and We gave David a Book (the zabûr, i.e. the psalms).
4:164 And [We sent forth] some Messengers We have already told you (Muhammad) about, and some We have not told you about. And Allah spoke to Moses directly.
4:165 Messengers, who were bearers of good news (for the believers) and warners (to the unbelievers), so that mankind will have no plea against Allah, after the Messenger’s coming. Allah is Mighty and Wise!
4:166 But Allah bears witness (to your [Muhammad’s] Prophethood) by what He has revealed to you, that He revealed it with His Knowledge. The angels bear witness too, and Allah suffices as a witness!
4:167 Indeed, those who disbelieve and debar other from the path of Allah have gone far astray!
4:168 Those who disbelieve and act unjustly, Allah will never forgive them nor lead them to any path,
4:169 Other than the path of Hell, abiding therein forever. That for Allah is an easy matter!
4:170 O mankind, the Messenger has come to you with the truth from your Lord. If you believe, it would be better for you; but if you disbelieve then surely to Allah belongs what is in the heavens and on the earth. Allah is All-Knowing, Wise.
The juxtaposition of revelations about the Psalms and Allah’s casual attitude to torture you may find significant.
17:54 Your Lord knows you best. If He pleases, He will have mercy on you, and if He pleases He will torture you. We have not sent you (Muhammad) to be their guardian.
17:55 And your Lord knows best what is in the heavens and on earth. We bestowed on some of the Prophets more gifts than on the others, and We gave David the Psalms.
Allah revealed that, in the Psalms, he bequeathed the earth to His "righteous servants". A promise I am not aware of, and which He intends to keep upon restoring it and making the earth habitable again, one must assume, after completely destroying it on Judgement Day.
21:100 They groan with pain therein (Hell) and they do not hear.
21:101 Those to whom We had given the fairest reward are kept away from it.
21:102 They do not hear its hissing, and they abide forever in what their hearts desire.
21:103 The greatest terror shall not cause them to grieve and the angels shall receive them saying: “This is your day that you were promised”;
21:104 The day when We will fold heaven like a scroll of writing, just as We began Our First creation, We shall bring it back – a promise [binding] on Us that We shall fulfil.
21:105 We have written in the Psalms that, after the Reminder, My righteous servants shall inherit the earth.
21:106 Surely, there is in this (Qur’an) a Message to a worshipping people.
As the owner, He can, of course, give it to anyone He pleases.
19:40 It is We Who shall inherit the earth and whomever is on it, and to Us they shall be returned.
More bounties for David and some advice on making body armour:
34:10 We have given David a bounty from Us; “O mountains, proclaim the praise with him, and you birds”, and We softened the iron for him.
34;11 “Fashion ample coats of arms and measure well the links; and do you all the righteous deeds. I am fully observant of what you do.”