وَقَـٰتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌۭ وَيَكُونَ ٱلدِّينُ كُلُّهُۥ لِلَّهِ ۚ فَإِنِ ٱنتَهَوْا۟ فَإِنَّ ٱللَّهَ بِمَا يَعْمَلُونَ بَصِيرٌۭ
“Fight against them until there is no more fitna — and [your] devotion will be entirely to Allah. But if they desist, then surely, Allah is All-Seeing of what they do. And if they do not comply, then know that Allah is your Protector. What an excellent Protector, and what an excellent Helper!”
Surah al-Anfal was revealed on the plains of Badr regarding the battle and its aftermath.