Surah Al-Anbiya, ayah 78

21:78

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

Wadāwūda wasulaymāna idh yahkumāni fil-harthi idh nafashat fīhi ghanamul-qawmi wakunnā lihukmihim shāhidīn

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

Footnotes

896 Eating and destroying the crops.