Abdullah bin Masud reported,

Regarding the verse "Those whom they invoke themselves seek the means of access to their Lord" [Isra 17:57], he said, "It was revealed concerning a group of Arabs who used to worship certain jinn. The jinn embraced Islam, but the humans who worshipped them remained unaware of this. So this verse was revealed, 'Those whom they invoke themselves seek the means of access to their Lord' [Isra 17:57]."

Azami 12660

Sahih

عن عبد الله بن مسعود

{أوليك الذين يدعون يبتغون إلى ربهم الوسيلة} قال: نزلت فى نفر من العرب كانوا يعبدون نفرا من الجن، فأسلم الجنيون، والإنس الذين كانوا يعبدونهم لا يشعرون، فنزلت: {أوليك الذين يدعون يبتغون إلى ربهم الوسيلة}

الأعظمي 12660صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "Say, call upon those whom you have claimed besides Him, for they do not possess the removal of adversity from you or its transfer. Those whom they invoke seek means of access to their Lord, which of them is nearest, and they hope for His mercy and fear His punishment. Indeed the punishment of your Lord is"
Numbering
Jami al-Kamil 12660 (2nd edition)
Azami 12660