Surah Al-Imran, ayah 165

3:165

أَوَلَمَّآ أَصَٰبَتۡكُم مُّصِيبَةٞ قَدۡ أَصَبۡتُم مِّثۡلَيۡهَا قُلۡتُمۡ أَنَّىٰ هَٰذَاۖ قُلۡ هُوَ مِنۡ عِندِ أَنفُسِكُمۡۗ إِنَّ ٱللَّهَ عَلَىٰ كُلِّ شَيۡءٖ قَدِيرٞ ١٦٥

Awalammā asābatkum musībatun qad asabtum mithlayhā qultum annā hādhā qul huwa min 'indi anfusikum innallāha 'alā kulli shay'in qadīr

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.