Surah Aal-i-Imraan

3:155

إِنَّ ٱلَّذِينَ تَوَلَّوْا۟ مِنكُمْ يَوْمَ ٱلْتَقَى ٱلْجَمْعَانِ إِنَّمَا ٱسْتَزَلَّهُمُ ٱلشَّيْطَٰنُ بِبَعْضِ مَا كَسَبُوا۟ ۖ وَلَقَدْ عَفَا ٱللَّهُ عَنْهُمْ ۗ إِنَّ ٱللَّهَ غَفُورٌ حَلِيمٌۭ

Indeed, those of you who turned back on the day the two armies met, it was Satan who caused them to slip because of some [blame] they had earned. But Allah has already forgiven them. Indeed, Allah is Forgiving and Forbearing.

Tafsir 3:155

Those of you who were defeated, O Companions of Muhammad (peace be upon him), on the day the army of the idolaters and the army of the Muslims met at Uḥud, it was Satan who made you slip, because of what you had earned from doing wrong. Allah has forgiven them, and will not take them to account for it, out of His favour and mercy. Allah forgives those who repent to Him, and is Forbearing, not quick to punish.