Ali ‘Imran Ayah 166
وَمَآ أَصَـٰبَكُمْ يَوْمَ ٱلْتَقَى ٱلْجَمْعَانِ فَبِإِذْنِ ٱللَّهِ وَلِيَعْلَمَ ٱلْمُؤْمِنِينَ ١٦٦
So what you suffered on the day the two armies met was by Allah’s Will, so that He might distinguish the ?true? believers
Read quran online for free with translation