[38.24] (David) said: He hath wronged thee in demanding thine ewe in addition to his ewes, and lo! many partners oppress one another, save such as believe and do good works, and they are few. And David guessed that We had tried him, and he sought forgiveness of his Lord, and he bowed himself and fell down prostrate and repented.
[38.26] (And it was said unto him): O David! Lo! We have set thee as a viceroy in the earth; therefor judge aright between mankind, and follow not desire that it beguile thee from the way of Allah. Lo! those who wander from the way of Allah have an awful doom, forasmuch as they forgot the Day of Reckoning.
