Answer:
Allah Almighty says:
إِذْ يُغَشِّيكُمُ النُّعَاسَ أَمَنَةً مِّنْهُ وَيُنَزِّلُ عَلَيْكُم مِّنَ السَّمَاءِ مَاءً لِّيُطَهِّرَكُم بِهِ وَيُذْهِبَ عَنكُمْ رِجْزَ الشَّيْطَانِ وَلِيَرْبِطَ عَلَىٰ قُلُوبِكُمْ وَيُثَبِّتَ بِهِ الْأَقْدَامَ ﴿١١﴾
“When He was covering you with drowsiness, as security from Him against fear, and was sending down water upon you from the sky, so that He might purify you with it, remove from you the filth of Satan, strengthen your hearts with a firm bond, and make your feet firm with it.”
In this verse, Allah is reminding the Muslims of the favour He did them by casting drowsiness upon them, which proved to be a guarantee of security for them, so that they no longer feared the enemy’s great numbers.
وَيُنَزِّلُ عَلَيْكُم مِّنَ السَّمَاءِ مَاءً This means that at the battle of Badr there were heaps of sand between the Muslims and the water, and severe weakness had overtaken the Muslims. Satan put anger into their hearts. He was whispering to them: you think that you are friends of Allah, and the Messenger of Allah is among you, yet the polytheists have overcome you in getting to the water, and you will pray without purification. So Allah sent heavy rain upon them, the Muslims drank water and attained purification, and Allah removed the filth of Satan from them. The sand became firm because of the rain. People and animals began to walk on it easily.
Allah Almighty says:
وَإِذْ زَيَّنَ لَهُمُ الشَّيْطَانُ أَعْمَالَهُمْ وَقَالَ لَا غَالِبَ لَكُمُ الْيَوْمَ مِنَ النَّاسِ وَإِنِّي جَارٌ لَّكُمْ ۖ فَلَمَّا تَرَاءَتِ الْفِئَتَانِ نَكَصَ عَلَىٰ عَقِبَيْهِ وَقَالَ إِنِّي بَرِيءٌ مِّنكُمْ إِنِّي أَرَىٰ مَا لَا تَرَوْنَ إِنِّي أَخَافُ اللَّـهَ ۚ وَاللَّـهُ شَدِيدُ الْعِقَابِ ﴿٤٨﴾
“And when Satan made their deeds appear attractive to them and said: Today no one among mankind will overcome you, and indeed I am your protector. Then when the two groups saw each other, he turned back on his heels and said: Indeed I am free of you, indeed I see what you do not see. Indeed I fear Allah, and Allah is severe in punishment.”
Satan made attractive to them what they had come with, and tempted them that today no one among mankind would overcome them. He removed their fear and dread and said: I am the one who gives you protection.
On the day of Badr, Iblis came with an army of devils, in the form of Suraqah ibn Malik ibn Ju’shum, a man of Banu Mudlij. He said to the polytheists: ولا غالب لگا Then when the people formed their ranks, Abu Jahl said: O Allah! Help whichever of us is closer to the truth. The Messenger of Allah ﷺ raised his hands in supplication and said: My Lord! If this group is destroyed today, You will never be worshipped. Then Jibril (peace be upon him) said: Take a handful of soil. The Prophet ﷺ took a handful of soil and threw it at the faces of the polytheists. There was no polytheist who came forward or remained but that some of that soil fell in his eyes, nostrils and mouth, so they turned their backs and fled. Jibril (peace be upon him) came towards Iblis, and when Iblis saw him, his hand was in the hand of a polytheist. He pulled his hand free and fled, turning his back on his army. A man said to him: Suraqah! Did you not declare that you were our companion? He said: Indeed I am free of you, because I see what you do not see.