And (remember) Dawūd (David) and Sulaimān (Solomon), when they were adjudicating about the tillage in which the goats of other people wandered at night (and trampled it), and We were witness to their judgment.
So, We enabled Sulaimān to understand it. And to each one of them We gave wisdom and knowledge. And with Dawūd We subjugated the mountains that pronounced tasbīH (Allah’s purity), and the birds as well. And We were the One who did (it).
And for Sulaimān, (We subjugated) the violent wind that blew under his command to the land in which We placed Our blessings. And We were the One who knew everything.
And from the devils, (We subjugated for him) those who dived in water for him and did jobs other than that. And We were the One who kept watch over them.
So, We answered his prayer and removed whatever pain he had, and gave him (back) his family and the like thereof along with them, as a mercy from Our own Self and as a lesson for the worshippers.
And (remember) Dhunnūn (the man of the fish, namely Yūnus X), when he walked away in anger and thought that We would never put him to trouble. Then, he called (Us) in depths of darkness saying, “There is no god but You. Pure are You. Indeed I was among the wrongdoers”.