Tafsir of Surah Aal-i-Imraan 3:165
﴿أَوَلَمَّا أَصَابَتْكُم مُّصِيبَةٌ قَدْ أَصَبْتُم مِّثْلَيْهَا قُلْتُمْ أَنَّىٰ هَٰذَا قُلْ هُوَ مِنْ عِندِ أَنفُسِكُمْ إِنَّ اللَّهَ عَلَىٰ كُلِّ شَيْءٍ قَدِيرٌ﴾
Translation of the meaning
Why [is it that] when a [single] disaster struck you [on the day of Uḥud], although you had struck [the enemy in the battle of Badr] with one twice as great, you said, "From where is this?" Say, "It is from yourselves [i.e., due to your sin]." Indeed, Allāh is over all things competent.
English Translation - Noor International Center — v1.1.2 · QuranEnc.comThe words of the two imams are given in their original Arabic, verbatim, with references.
Imam Ibn al-Qayyim
فجمع الله في الآية بين ما أصابوا بفعلهم وكسبهم وما أصابهم مما ليس فعلا لهم«شفاء العليل في مسائل القضاء والقدر والحكمة والتعليل» 1/160