Sure Al-Anbiyaa

21:78

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

Und (auch) Dawud und Sulaiman, als sie über das Saatfeld urteilten. Darin hatte Kleinvieh von (fremden) Leuten nachts geweidet. Und Wir waren für ihr Urteil Zeugen.

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.