Ali 'Imran 3:154
ثُمَّ أَنزَلَ عَلَيْكُم مِّنۢ بَعْدِ ٱلْغَمِّ أَمَنَةً نُّعَاسًا يَغْشَىٰ طَآئِفَةً مِّنكُمْ ۖ وَطَآئِفَةٌ قَدْ أَهَمَّتْهُمْ أَنفُسُهُمْ يَظُنُّونَ بِٱللَّهِ غَيْرَ ٱلْحَقِّ ظَنَّ ٱلْجَـٰهِلِيَّةِ ۖ يَقُولُونَ هَل لَّنَا مِنَ ٱلْأَمْرِ مِن شَىْءٍ ۗ قُلْ إِنَّ ٱلْأَمْرَ كُلَّهُۥ لِلَّهِ ۗ يُخْفُونَ فِىٓ أَنفُسِهِم مَّا لَا يُبْدُونَ لَكَ ۖ يَقُولُونَ لَوْ كَانَ لَنَا مِنَ ٱلْأَمْرِ شَىْءٌ مَّا قُتِلْنَا هَـٰهُنَا ۗ قُل لَّوْ كُنتُمْ فِى بُيُوتِكُمْ لَبَرَزَ ٱلَّذِينَ كُتِبَ عَلَيْهِمُ ٱلْقَتْلُ إِلَىٰ مَضَاجِعِهِمْ ۖ وَلِيَبْتَلِىَ ٱللَّهُ مَا فِى صُدُورِكُمْ وَلِيُمَحِّصَ مَا فِى قُلُوبِكُمْ ۗ وَٱللَّهُ عَلِيمٌۢ بِذَاتِ ٱلصُّدُورِ
Thumma anzala AAalaykum min baAAdi alghammiamanatan nuAAasan yaghsha ta-ifatan minkumwata-ifatun qad ahammat-hum anfusuhum yathunnoonabillahi ghayra alhaqqi thannaaljahiliyyati yaqooloona hal lana mina al-amri minshay-in qul inna al-amra kullahu lillahi yukhfoona feeanfusihim ma la yubdoona laka yaqooloona law kanalana mina al-amri shay-on ma qutilna hahunaqul law kuntum fee buyootikum labaraza allatheena kutibaAAalayhimu alqatlu ila madajiAAihim waliyabtaliyaAllahu ma fee sudoorikum waliyumahhisama fee quloobikum wallahu AAaleemun bithatiassudoor
Then after distress, He sent down upon you security [in the form of] drowsiness, overcoming a faction of you, while another faction worried about themselves, thinking of Allāh other than the truth - the thought of ignorance, saying, "Is there anything for us [to have done] in this matter?" Say, "Indeed, the matter belongs completely to Allāh." They conceal within themselves what they will not reveal to you. They say, "If there was anything we could have done in the matter, we [i.e., some of us] would not have been killed right here." Say, "Even if you had been inside your houses, those decreed to be killed would have come out to their death beds." [It was] so that Allāh might test what is in your breasts and purify what is in your hearts. And Allāh is Knowing of that within the breasts.
Then, after the grief, He poured tranquility upon you - a drowsiness overtaking a group of you. Another group was worrying about their own selves, harboring thoughts about Allah that were untrue - thoughts of ignorance. They were saying, “Is there anything in our hands?” Say, “The whole thing belongs to Allah.” They conceal in their hearts what they do not disclose to you.They say, “If we had any say in the matter, we would not have been killed here.”Say, “If you were in your homes, those destined to be killed would have come out all the way to their (final) resting -places.” (All this was done) so that Allah may test your inner qualities and may purify what is in your hearts. Allah is All-Aware of what lies in the hearts.