"And We have created you, then We fashioned you." Mujahid said: This means: We fashioned you in the loins of Adam.
"Then We said to the angels, 'Prostrate before Adam.'" Al-Hasan said: Iblis was not one of the angels; he was created from the fire of the scorching wind (al-samum), while the angels were created from light. Allah commanded the angels to prostrate to Adam and also commanded Iblis to prostrate to him, thus including all those commanded together.
﴿وَلَقَد خَلَقْنَاكُمْ ثمَّ صورناكم﴾ قَالَ مُجَاهِدٌ: يَعْنِي: صَوَّرْنَاكُمْ فِي ظَهْرِ آدَمَ.
﴿ثُمَّ قُلْنَا لِلْمَلائِكَةِ اسجدوا لآدَم﴾ قَالَ الْحَسَنُ:
إِنَّ إِبْلِيسَ لَمْ يَكُنْ مِنَ الْمَلَائِكَةِ، وَإِنَّهُ خُلِقَ مِنْ نَارِ السَّمُومِ، وَإِنَّ الَمَلَائِكَةَ خُلِقُوا مِنَ النُّورِ، وَإِنَّ اللَّهَ أَمَرَ الْمَلَائِكَةَ بِالسُّجُودِ لِآدَمَ، وَأَمَرَ إِبْلِيسَ أَيْضًا بِالسُّجُودِ لَهُ، فَجَمَعَ المأمورين جَمِيعًا.