The ʿifrīt of the who offered to bring the Queen of Sabaʾ's throne to .
The story
An offer of strength
When asked who could bring him the Queen's throne before she arrived, an ʿifrīt of the said he would bring it before Sulaymān rose from his place, for he was strong and trustworthy for the task. Ibn Kathīr explains that the jinn were subjected to Sulaymān by Allah's gift, and this was a display of their strength.
Then one who had knowledge of the scripture said he would bring it before 's glance returned to him — and the throne stood before him. Sulaymān said: this is from my Lord's bounty, to test whether I am grateful or ungrateful. Ibn Kathīr explains that the miracle's purpose was gratitude, not pride.
The 's strength and the scholar's knowledge both served a prophet — and both were from Allah. 's first response to the miracle was to name it a test of gratitude.
Summaries of Ibn Kathīr's commentary on the linked āyāt, with authentic ḥadīth noted in the text where used. Verse links open Quran.com text and your chosen translation.