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 himself.
Quran 27:40
Quran 27:40

“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 himself.”

A pious knowledgeable man in the presence of Solomon who had knowledge of the scripture, part of which was the greatest name of Allah which Allah accepts prayers when supplicated through, said: “I shall bring her throne to you before your glance returns to you, by praying to Allah to bring it”. So he prayed, and Allah answered his prayer.

The plain meaning, from Al-Mukhtasar fi at-Tafsir

The full passage

قَالَ ٱلَّذِى عِندَهُۥ عِلْمٌ مِّنَ ٱلْكِتَٰبِ أَنَا۠ ءَاتِيكَ بِهِۦ قَبْلَ أَن يَرْتَدَّ إِلَيْكَ طَرْفُكَ ۚ فَلَمَّا رَءَاهُ مُسْتَقِرًّا عِندَهُۥ قَالَ هَٰذَا مِن فَضْلِ رَبِّى لِيَبْلُوَنِىٓ ءَأَشْكُرُ أَمْ أَكْفُرُ ۖ وَمَن شَكَرَ فَإِنَّمَا يَشْكُرُ لِنَفْسِهِۦ ۖ وَمَن كَفَرَ فَإِنَّ رَبِّى غَنِىٌّ كَرِيمٌ

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."

Quran 27:40The Arabic it was clipped from
The explanation

What does Quran 27:40 mean?

Sulayman (peace be upon him) says this at the moment of an outright miracle: he had asked who could bring him the throne of the queen of Sheba, and one who had knowledge of the Scripture brought it before his glance returned to him. Faced with power on that scale, what he names is a test — and the verse he speaks makes the same point Luqman was given, that gratitude returns to the one who offers it.

Written from Al-Mukhtasar fi at-Tafsir

Where it sits