Sahih Muslim | Book 43 | Hadith Number 7184

Narrated by Abdullah b. Mas'ud
Abdullah b. Mas'ud said in connection with the verse: "Those whom they call upon, themselves seek the means of access to their Lord," that that verse was revealed in connection with a party of Arabs who used to worship a group amongst the jinn; the jinn embraced Islam but the people kept worshipping them without being conscious of it. Then this verse was revealed: "Those whom they call upon, themselves seek the means of access to their Lord.