The Story of Adam and Iblis
Allah points out to the Children of Adam the enmity of Iblis towards them and their father before them, and rebukes those who follow him and go against their Creator and Master. It is He who created them from nothing and sustains and nourishes them by His kindness, yet they still took Iblis as their friend and declared their enmity towards Allah.
So Allah says;
وَإِذْ قُلْنَا لِلْمَلَإيِكَةِ
And (remember) when We said to the angels,
meaning all the angels, as was mentioned in the beginning of Surah Al-Baqarah.
اسْجُدُوا لاِدَمَ
Prostrate yourselves unto Adam,
a prostration of respect and honor, as Allah says;
وَإِذْ قَالَ رَبُّكَ لِلْمَلَـيِكَةِ إِنِّى خَـلِقٌ بَشَرًا مِّن صَلْصَـلٍ مِّنْ حَمَإٍ مَّسْنُونٍ
فَإِذَا سَوَّيْتُهُ وَنَفَخْتُ فِيهِ مِن رُّوحِى فَقَعُواْ لَهُ سَـجِدِينَ
And (remember) when your Lord said to the angels, "I am going to create a human (Adam) from dried (sounding) clay of altered mud. So, when I have fashioned him completely and breathed into him the soul which I created for him, then fall (you) down prostrating yourselves unto him. (15;28-29)
فَسَجَدُوا إِلاَّ إِبْلِيسَ كَانَ مِنَ الْجِنِّ
So they prostrated themselves except Iblis. He was one of the Jinn;
meaning, his original nature betrayed him. He had been created from smokeless fire, whereas the angels had been created from light, as is stated in Sahih Muslim where it is reported that A'ishah, may Allah be pleased with her, said that the Messenger of Allah said;
خُلِقَتِ الْمَلَيِكَةُ مِنْ نُورٍ
وَخُلِقَ إِبْلِيسُ مِنْ مَارِجٍ مِنْ نَارٍ
وَخُلِقَ ادَمُ مِمَّا وُصِفَ لَكُم
The angels were created from light,
Iblis was created from smokeless fire, and
Adam was created from that which has been described to you.
When matters are crucial, every vessel leaks that which it contains and is betrayed by its true nature. Iblis used to do what the angels did and resembled them in their devotion and worship, so he was included when they were addressed, but he disobeyed and went against what he was told to do. So Allah points out here that he was one of the Jinn, i.e., he was created from fire, as He says elsewhere;
أَنَاْ خَيْرٌ مِّنْهُ خَلَقْتَنِي مِن نَّارٍ وَخَلَقْتَهُ مِن طِينٍ
I am better than he. You created me from fire, and You created him from clay. (38;76)
Al-Hasan Al-Basri said,
"Iblis was not one of the angels, not even for a second. He was the origin of the Jinn just as Adam, upon him be peace, was the origin of mankind."
This was narrated by Ibn Jarir with a Sahih chain.
فَفَسَقَ عَنْ أَمْرِ رَبِّهِ
he disobeyed the command of his Lord.
meaning by stepping beyond the bounds of obedience to Allah.
Fisq (disobeying) implies going out or stepping beyond. When the date emerges from its flower, the verb used in Arabic is Fasaqat; the same verb is used to describe a mouse coming out of its hole when it comes out to do damage.
Then Allah says, rebuking those who follow and obey Iblis;
أَفَتَتَّخِذُونَهُ وَذُرِّيَّتَهُ أَوْلِيَاء مِن دُونِي
Will you then take him and his offspring as protectors and helpers rather than Me!
meaning, instead of Me.
وَهُمْ لَكُمْ عَدُوٌّ
while they are enemies to you,
This is why Allah says;
بِيْسَ لِلظَّالِمِينَ بَدَلاً
What an evil is the exchange for the wrongdoers.
This is like the Ayah in Surah Ya Sin where, after mentioning the Resurrection and its terrors, and the ultimate end of the blessed and the doomed, Allah then says;
وَامْتَازُوا الْيَوْمَ أَيُّهَا الْمُجْرِمُونَ
(It will be said);"And O you the criminals! Get you apart this Day (from the believers). until;
أَفَلَمْ تَكُونُوا تَعْقِلُونَ
(Did you not then understand). (36;59-62