38:22 they went to David whereupon he was afraid of them, but they said, 'Do not be afraid, we are two who have a dispute, one of us has wronged the other. Judge between us justly, and do not transgress, and guide us to the Right Path.
38:23 This, my brother has ninety-nine ewes, but I have only one ewe (a female sheep). He said, "Give her into my keeping" and overcame me in the argument.'
38:24 He (David) replied, 'He has without doubt wronged you in seeking to add your ewe to his sheep. Many inter-mixers wrong one another; except those who believe, and do good works, and they are few indeed.' David realized that We had tried him and sought the forgiveness of his Lord and fell down, prostrate and repented.
38:26 (We said), 'David, We have made you a caliph in the earth. Judge with justice among people and do not yield to your own preference in case it should lead you from the Path of Allah. Surely, a terrible punishment awaits those who stray from the Path of Allah, because they forget the Day of Reckoning.'