وَمَا كَانَ ٱللَّهُ لِيُعَذِّبَهُمْ وَأَنتَ فِيهِمْ ۚ وَمَا كَانَ ٱللَّهُ مُعَذِّبَهُمْ وَهُمْ يَسْتَغْفِرُونَ
“Whenever Our Revelations are recited to them, they challenge [you], "We have already heard [the recitation]. If we wanted, we could have easily produced something similar. This [Quran] is nothing but ancient fables!" And [remember] when they prayed, "O Allah! If this is indeed the Truth from You, then rain down stones upon us from the sky or overcome us with a painful Punishment." But Allah would never Punish them while you [O Prophet] were in their midst. Nor would He ever Punish them if they prayed for forgiveness.”
Surah al-Anfal was revealed on the plains of Badr regarding the battle and its aftermath.