Aal-'Imran - 3:154

ثُمَّ أَنزَلَ عَلَيْكُم مِّن بَعْدِ الْغَمِّ أَمَنَةً نُّعَاسًا يَغْشَى طَآئِفَةً مِّنكُمْ وَطَآئِفَةٌ قَدْ أَهَمَّتْهُمْ أَنفُسُهُمْ يَظُنُّونَ بِاللّهِ غَيْرَ الْحَقِّ ظَنَّ الْجَاهِلِيَّةِ يَقُولُونَ هَل لَّنَا مِنَ الأَمْرِ مِن شَيْءٍ قُلْ إِنَّ الأَمْرَ كُلَّهُ لِلَّهِ يُخْفُونَ فِي أَنفُسِهِم مَّا لاَ يُبْدُونَ لَكَ يَقُولُونَ لَوْ كَانَ لَنَا مِنَ الأَمْرِ شَيْءٌ مَّا قُتِلْنَا هَاهُنَا قُل لَّوْ كُنتُمْ فِي بُيُوتِكُمْ لَبَرَزَ الَّذِينَ كُتِبَ عَلَيْهِمُ الْقَتْلُ إِلَى مَضَاجِعِهِمْ وَلِيَبْتَلِيَ اللّهُ مَا فِي صُدُورِكُمْ وَلِيُمَحَّصَ مَا فِي قُلُوبِكُمْ وَاللّهُ عَلِيمٌ بِذَاتِ الصُّدُورِ
[3:154]
Then after sorrow He sent down security upon you, a calm coming upon a party of you, and (there was) another party whom their own souls had rendered anxious; they entertained about Allah thoughts of ignorance quite unjustly, saying: We have no hand in the affair. Say: Surely the affair is wholly (in the hands) of Allah. They conceal within their souls what they would not reveal to you. They say: Had we any hand in the affair, we would not have been slain here. Say: Had you remained in your houses, those for whom slaughter was ordained would certainly have gone forth to the places where they would be slain, and that Allah might test what was in your breasts and that He might purge what was in your hearts; and Allah knows what is in the breasts.
After (the excitement) of the distress, He sent down calm on a band of you overcome with slumber, while another band was stirred to anxiety by their own feelings, Moved by wrong suspicions of Allah-suspicions due to ignorance. They said: "What affair is this of ours?" Say thou: "Indeed, this affair is wholly Allah's." They hide in their minds what they dare not reveal to thee. They say (to themselves): "If we had had anything to do with this affair, We should not have been in the slaughter here." Say: "Even if you had remained in your homes, those for whom death was decreed would certainly have gone forth to the place of their death"; but (all this was) that Allah might test what is in your breasts and purge what is in your hearts. For Allah knoweth well the secrets of your hearts.
Then, after grief, He sent down security for you. As slumber did it overcome a party of you, while (the other) party, who were anxious on their own account, thought wrongly of Allah, the thought of ignorance. They said: Have we any part in the cause? Say (O Muhammad): The cause belongeth wholly to Allah. They hide within themselves (a thought) which they reveal not unto thee, saying: Had we had any part in the cause we should not have been slain here. Say: Even though ye had been in your houses, those appointed to be slain would have gone forth to the places where they were to lie. (All this hath been) in order that Allah might try what is in your breasts and prove what is in your hearts. Allah is Aware of what is hidden in the breasts (of men).