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.
quran:18:50

And ˹mention˺ when We said to the angels, "Prostrate to Adam," and they prostrated, except for Iblees. He was of the jinn and departed from the command of his Lord. Then will you take him and his descendants as allies other than Me while they are enemies to you? Wretched it is for the wrongdoers as an exchange.  

And when (idh is dependent because it is governed by ˹an implicit˺ udhkur, ‘mention ˹when˺’) We said to the angels, ‘Prostrate before Adam’, a prostration involving a bow, not placing one’s forehead down ˹to the ground˺, as a greeting to him; and so they prostrated, ˹all˺ except Iblīs. He was ˹one˺ of the jinn — some say that these ˹creatures˺ are a species of angels, in which case the exceptive clause ˹illā Iblīs, ‘except Iblīs’˺ is a continuous one; but it is also said to be discontinuous, since Iblīs is ˹considered˺ the progenitor of ˹all˺ the jinn, having offspring who are mentioned alongside him further below; angels, on the other hand, do not have offspring; and he transgressed against his Lord’s command, that is to say, he rebelled against obedience to Him by refraining from ˹performing˺ the prostration. Will you then take him and his offspring — this address is to Adam and his progeny (the ˹final pronominal suffix˺ hā’ in both words refers to Iblīs) for your patrons instead of Me, obeying them, when they are an enemy to you?, in other words, ˹when they are your˺ enemies (wa-hum lakum ‘aduwwun is a circumstantial qualifier). How evil for the evildoers is that substitute!, of Iblīs and his offspring, in obeying them instead of obeying God.
القرآن:١٨:٥٠

وَإِذْ قُلْنَا لِلْمَلَائِكَةِ اسْجُدُوا لِآدَمَ فَسَجَدُوا إِلَّا إِبْلِيسَ كَانَ مِنَ الْجِنِّ فَفَسَقَ عَنْ أَمْرِ رَبِّهِ ۗ أَفَتَتَّخِذُونَهُ وَذُرِّيَّتَهُ أَوْلِيَاءَ مِنْ دُونِي وَهُمْ لَكُمْ عَدُوٌّ ۚ بِئْسَ لِلظَّالِمِينَ بَدَلًا  

{وإذ} منصوب باذكر {قلنا للملائكة اسجدوا لآدم} سجود انحناء لا وضع جبهة تحية له {فسجدوا إلا إبليس كان من الجن} قيل هم نوع من الملائكة فالاستثناء متصل وقيل هو منقطع وإبليس هو أبو الجن فله ذرية ذكرت معه بعد والملائكة لا ذرية لهم {ففسق عن أمر ربه} أي خرج عن طاعته بترك السجود {أفتتخذونه وذريته} الخطاب لآدم وذريته والهاء في الموضعين لإبليس {أولياء من دوني} تطيعونهم {وهم لكم عدو} أي أعداء حال {بئس للظالمين بدلاً} إبليس وذريته في إطاعتهم بدل إطاعة الله.