Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
hakim:3378Muḥammad b. ʿAlī b. Duḥaym al-Shaybānī Bi-al-Kūfah > Aḥmad b. Ḥāzim b. Abū Gharazah > Qabīṣah b. ʿUqbah > Sufyān > al-Aʿmash > Ibrāhīm > Abū Maʿmar > ʿAbdullāh

[Machine] There was a group of humans who were worshipping a group of jinn. Then the group of jinn accepted Islam and the humans continued to cling to their worship. So Allah, the Almighty, revealed, "Say, 'Call upon those whom you claim [as deities] besides Him; they have no power to remove affliction from you or to change it.' Those [whom they invoke] seek means of access to their Lord, [striving as to] which of them would be nearest, and they hope for His mercy and fear His punishment." [Surah Al-Isra' 57] "Both groups with the letter 'ya'."  

الحاكم:٣٣٧٨أَخْبَرَنَا مُحَمَّدُ بْنُ عَلِيِّ بْنِ دُحَيْمٍ الشَّيْبَانِيُّ بِالْكُوفَةِ ثنا أَحْمَدُ بْنُ حَازِمِ بْنِ أَبِي غَرَزَةَ ثنا قَبِيصَةُ بْنُ عُقْبَةَ ثنا سُفْيَانُ عَنِ الْأَعْمَشِ عَنْ إِبْرَاهِيمَ عَنْ أَبِي مَعْمَرٍ عَنْ عَبْدِ اللَّهِ قَالَ

كَانَ نَفَرٌ مِنَ الْإِنْسِ يَعْبُدُونَ نَفَرًا مِنَ الْجِنِّ فَأَسْلَمَ النَّفَرُ مِنَ الْجِنِّ وَتَمَسَّكَ الْإِنْسِيُّونَ بِعِبَادَتِهِمْ فَأَنْزَلَ اللَّهُ ﷻ {قُلِ ادْعُوا الَّذِينَ زَعَمْتُمْ مِنْ دُونِهِ فَلَا يَمْلِكُونَ كَشْفَ الضُّرِّ عَنْكُمْ وَلَا تَحْوِيلًا أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ} [الإسراء 57] «كِلَاهُمَا بِالْيَاءِ»  

هَذَا حَدِيثٌ صَحِيحٌ عَلَى شَرْطِ مُسْلِمٍ وَلَمْ يُخْرِجَاهُ على شرط مسلم

See similar narrations below:

Collected by Muslim
muslim:3030aAbū Bakr b. Abū Shaybah > ʿAbdullāh b. Idrīs > al-Aʿmash > Ibrāhīm > Abū Maʿmar

" Those to whom they call upon, themselves seek the means or access to their Lord as to whoever of them becomes nearest" (xvii. 57) that it related to a party of Jinn who were being worshipped and they embraced Islam but those who worshipped them kept on worshipping them (though the Jinn whom the misguided people worshipped had become Muslims). It was then that this verse was revealed.  

مسلم:٣٠٣٠aحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ إِدْرِيسَ عَنِ الأَعْمَشِ عَنْ إِبْرَاهِيمَ عَنْ أَبِي مَعْمَرٍ

عَنْ عَبْدِ اللَّهِ فِي قَوْلِهِ ﷻ { أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ أَيُّهُمْ أَقْرَبُ} قَالَ كَانَ نَفَرٌ مِنَ الْجِنِّ أَسْلَمُوا وَكَانُوا يُعْبَدُونَ فَبَقِيَ الَّذِينَ كَانُوا يَعْبُدُونَ عَلَى عِبَادَتِهِمْ وَقَدْ أَسْلَمَ النَّفَرُ مِنَ الْجِنِّ  

muslim:3030bAbū Bakr b. Nāfiʿ al-ʿAbdī > ʿAbd al-Raḥman > Sufyān > al-Aʿmash > Ibrāhīm > Abū Maʿmar

" Those whom they call upon, themselves seek the means of access to their Lord," that it related to a group of people who worshipped a party amongst the Jinn. The group from amongst the Jinn embraced Islam, but the people kept worshipping them as they did before, and it was (on this occasion) that the verse was revealed:" Those whom they call upon, themselves seek the means of access to their Lord." This hadith has been narrated on the authority of Sulaiman with the same chain of transmitters.  

مسلم:٣٠٣٠bحَدَّثَنِي أَبُو بَكْرِ بْنُ نَافِعٍ الْعَبْدِيُّ حَدَّثَنَا عَبْدُ الرَّحْمَنِ حَدَّثَنَا سُفْيَانُ عَنِ الأَعْمَشِ عَنْ إِبْرَاهِيمَ عَنْ أَبِي مَعْمَرٍ

عَنْ عَبْدِ اللَّهِ { أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ} قَالَ كَانَ نَفَرٌ مِنَ الإِنْسِ يَعْبُدُونَ نَفَرًا مِنَ الْجِنِّ فَأَسْلَمَ النَّفَرُ مِنَ الْجِنِّ وَاسْتَمْسَكَ الإِنْسُ بِعِبَادَتِهِمْ فَنَزَلَتْ { أُولَئِكَ الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمُ الْوَسِيلَةَ} وَحَدَّثَنِيهِ بِشْرُ بْنُ خَالِدٍ أَخْبَرَنَا مُحَمَّدٌ يَعْنِي ابْنَ جَعْفَرٍ عَنْ شُعْبَةَ عَنْ سُلَيْمَانَ بِهَذَا الإِسْنَادِ