Surah Al-Anbiyaa

21:78

وَدَاوُۥدَ وَسُلَيْمَٰنَ إِذْ يَحْكُمَانِ فِى ٱلْحَرْثِ إِذْ نَفَشَتْ فِيهِ غَنَمُ ٱلْقَوْمِ وَكُنَّا لِحُكْمِهِمْ شَٰهِدِينَ

And [mention] David and Solomon, when they judged concerning the field - when the sheep of a people overran it [at night], and We were witness to their judgement.

Tafsir 21:78

O Messenger! And mention the story of David and his son Solomon (peace be upon them), when they were passing judgement in the case brought to them regarding the two disputers: One of them had a herd that went into the fields of the other at night. I was witness to the judgement of David and Solomon; no part of their judgement evaded My knowledge.