فَلَمْ تَقْتُلُوهُمْ وَلَٰكِنَّ اللَّهَ قَتَلَهُمْ ۚ وَمَا رَمَيْتَ إِذْ رَمَيْتَ وَلَٰكِنَّ اللَّهَ رَمَىٰ ۚ وَلِيُبْلِيَ الْمُؤْمِنِينَ مِنْهُ بَلَاءً حَسَنًا ۚ إِنَّ اللَّهَ سَمِيعٌ عَلِيمٌ (17)
(8:17) So the fact is that it was not you, but it was Allah Who killed them; and it was not you when you threw [sand at them], but it was Allah Who threw it, *14 (and the believers were employed for the task) that He might cause the believers to successfully pass through this test. Allah is All-Hearing, All-Knowing.
*14). This refers to the occasion wnen the armies of the Muslims and the unbelievers stood face to face in the Battle of Badr and were on the verge of actual fighting. At that moment, the Prophet (peace be on him) threw a handful of dust at the enemy saying: 'May, their faces be scorched.' So saying the Prophet (peace be on him) made a gesture and the Muslims started their charge. (See Ahmad b. Hanbal, Musnad, vol. 1, p. 368; Ibn Hisham, vol. 1, p. 668; Ibn Kathir, comments on the verse - Ed.)