Aslam

Surah Al-Anfal — 8:16
وَمَن يُوَلِّهِمۡ يَوۡمَئِذٖ دُبُرَهُۥٓ إِلَّا مُتَحَرِّفٗا لِّقِتَالٍ أَوۡ مُتَحَيِّزًا إِلَىٰ فِئَةٖ فَقَدۡ بَآءَ بِغَضَبٖ مِّنَ ٱللَّهِ وَمَأۡوَىٰهُ جَهَنَّمُۖ وَبِئۡسَ ٱلۡمَصِيرُ
And whoever does so on such an occasion—unless it is a manoeuvre or to join their own troops—will earn the displeasure of Allah, and their home will be Hell. What an evil destination!

Commentary

And whoever turns their back running away- unless they are withdrawing as a strategy with the intention of turning back to fight, or doing it to join a group of Muslims in order to help them-then certainly, he will earn the anger of Allah, and his place in the Hereafter will be Hell; what a miserable destination and final destiny!

Read Tafsir Ibn Kathir