And We had certainly given to David and Solomon knowledge, and they said, "Praise [is due] to Allāh, who has favored us over many of His believing servants."
And Solomon inherited David. He said, "O people, we have been taught the language of birds, and we have been given from all things. Indeed, this is evident bounty."
Until, when they came upon the valley of the ants, an ant said, "O ants, enter your dwellings that you not be crushed by Solomon and his soldiers while they perceive not."
So [Solomon] smiled, amused at her speech, and said, "My Lord, enable me to be grateful for Your favor which You have bestowed upon me and upon my parents and to do righteousness of which You approve. And admit me by Your mercy into [the ranks of] Your righteous servants."
But he [i.e., the hoopoe] stayed not long and said, "I have encompassed [in knowledge] that which you have not encompassed, and I have come to you from Sheba with certain news.