The story of Prophet Sulayman (Solomon) (peace be upon him)
سُلَيْمَان عَلَيْهِ السَّلَام
1. A kingdom like no other
Sulayman inherited from Dawud and said: “O people, we have been taught the language of birds and given from everything” (27:16). His army was made of jinn, men and birds (27:17). Allah made the wind serve him (34:12), and the jinn worked for him, building for him what he willed (34:12–13).
2. The ant
When they came to the valley of the ants, an ant said: “O ants, enter your homes so that Sulayman and his soldiers do not crush you without noticing.” Sulayman smiled at her words and prayed: “My Lord, enable me to be grateful for Your favour which You have given me and my parents, and to do good that pleases You” (27:18–19).
3. The hoopoe and the Queen of Sheba
The hoopoe brought news of a queen in Sheba whose people worshipped the sun (27:22–24). Sulayman sent her a letter beginning “In the name of Allah, the Most Merciful, the Especially Merciful” (27:30). Her throne was brought to him in the blink of an eye, and he said: “This is from the favour of my Lord, to test me whether I will be grateful” (27:40). In the end she said: “I submit, with Sulayman, to Allah, Lord of the worlds” (27:44). When Sulayman died leaning on his staff, the jinn did not know until a termite ate through it (34:14).
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."
Said one who had knowledge from the Scripture, "I will bring it to you before your glance returns to you." And when [Solomon] saw it placed before him, he said, "This is from the favor of my Lord to test me whether I will be grateful or ungrateful. And whoever is grateful - his gratitude is only for [the benefit of] himself. And whoever is ungrateful - then indeed, my Lord is Free of need and Generous."
And when We decreed for him [i.e., Solomon] death, nothing indicated to them [i.e., the jinn] his death except a creature of the earth eating his staff. But when he fell, it became clear to the jinn that if they had known the unseen, they would not have remained in humiliating punishment.