وَمَن يُوَلِّهِمْ يَوْمَئِذٍۢ دُبُرَهُۥٓ إِلَّا مُتَحَرِّفًۭا لِّقِتَالٍ أَوْ مُتَحَيِّزًا إِلَىٰ فِئَةٍۢ فَقَدْ بَآءَ بِغَضَبٍۢ مِّنَ ٱللَّهِ وَمَأْوَىٰهُ جَهَنَّمُ ۖ وَبِئْسَ ٱلْمَصِيرُ
“O believers! When you face the disbelievers in battle, never turn your backs to them. And whoever does so on such an occasion —unless it is a maneuver or to join their own troops— will earn the displeasure of Allah, and their home will be Hell. What an evil destination!”
Surah al-Anfal was revealed on the plains of Badr regarding the battle and its aftermath.