Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:3:154

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 Allah 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 Allah." They conceal within themselves what they will not reveal to you. They say, "If there was anything we could have done in the matter, 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 Allah might test what is in your breasts and purify what is in your hearts. And Allah is Knowing of that within the breasts.  

Then He sent down upon you, after grief, security — a slumber (nu‘āsan, ‘slumber’ substitutes for amanatan, ‘security’) overcoming (yaghshā or taghshā) a party of you, namely, the believers. They would become dizzy under their shields and their swords would fall from their hands; and a party whose own souls distressed them, that is, they caused them grief, so that their only wish was their deliverance, regardless of the Prophet and his Companions, and they were unable to fall asleep: these were the hypocrites; thinking wrongly of God, thoughts of, those thoughts during the, age of ignorance, the moment they thought that the Prophet had been killed or that he would not be given victory, saying, ‘Have we any part whatever in the affair?’ (read ˹interrogative˺ hal as ˹negative˺ mā) that is, ˹we have no part in˺ the assistance which we were promised. Say, to them: ‘The affair belongs entirely (read accusative kullahu to denote an emphasis, or nominative kulluhu as a subject ˹of a new sentence˺, the predicate of which is ˹what follows˺) to God’, that is to say, the decree is His, He does what He wills. They conceal within their hearts what they do not disclose, what they ˹do not˺ manifest, to you, saying, (yaqūlūna, ‘saying’, is an explication of the preceding ˹statement˺) ‘Had we had any part in the affair, we would not have been slain here’, that is to say, ‘Had the choice been ours, we would not have set out and thus been slain; but we were forced to set out’. Say, to them: ‘Even if you had been in your houses, with some among you whom God had appointed that they be slain, those, of you, for whom it had been appointed, decreed, that they be slain would have sallied forth, would have gone forth, to the places where they were to lie’, the battleground where they were to fall, and they would have been slain; and their staying put ˹at home˺ would not have saved them, for God’s decree will be, inevitably. And, He did what He did at Uhud, that God might try, ˹that He might˺ test, what was in your breasts, your hearts, of sincerity or hypocrisy, and that He might prove, ˹that He might˺ distinguish, what was in your hearts; and God knows what is in the breasts, what is in the hearts. Nothing can be hidden from Him, and He tries people only to make ˹matters˺ manifest for them.
القرآن:٣:١٥٤

ثُمَّ أَنْزَلَ عَلَيْكُمْ مِنْ بَعْدِ الْغَمِّ أَمَنَةً نُعَاسًا يَغْشَىٰ طَائِفَةً مِنْكُمْ ۖ وَطَائِفَةٌ قَدْ أَهَمَّتْهُمْ أَنْفُسُهُمْ يَظُنُّونَ بِاللَّهِ غَيْرَ الْحَقِّ ظَنَّ الْجَاهِلِيَّةِ ۖ يَقُولُونَ هَلْ لَنَا مِنَ الْأَمْرِ مِنْ شَيْءٍ ۗ قُلْ إِنَّ الْأَمْرَ كُلَّهُ لِلَّهِ ۗ يُخْفُونَ فِي أَنْفُسِهِمْ مَا لَا يُبْدُونَ لَكَ ۖ يَقُولُونَ لَوْ كَانَ لَنَا مِنَ الْأَمْرِ شَيْءٌ مَا قُتِلْنَا هَاهُنَا ۗ قُلْ لَوْ كُنْتُمْ فِي بُيُوتِكُمْ لَبَرَزَ الَّذِينَ كُتِبَ عَلَيْهِمُ الْقَتْلُ إِلَىٰ مَضَاجِعِهِمْ ۖ وَلِيَبْتَلِيَ اللَّهُ مَا فِي صُدُورِكُمْ وَلِيُمَحِّصَ مَا فِي قُلُوبِكُمْ ۗ وَاللَّهُ عَلِيمٌ بِذَاتِ الصُّدُورِ  

{ثم أنزل عليكم من بعد الغم أمنة} أمنا {نعاسا} بدل {يغشى} بالياء والتاء {طائفة منكم} وهم المؤمنون فكانوا يميدون تحت الحجف وتسقط السيوف منهم {وطائفة قد أهمتهم أنفسهم} أي حملتهم على الهم فلا رغبة لهم إلا نجاتها دون النبي وأصحابه فلم يناموا وهم المنافقون {يظنون بالله} ظنا {غير} الظن {الحق ظَنَّ} أي كظن {الجاهلية} حيث اعتقدوا أن النبي قتل أولا ينصر {يقولون هل} ما {لنا من الأمر} أي النصر الذي وُعدناه {من شيء قل} لهم {إن الأمر كله} بالنصب توكيدا والرفع مبتدأ وخبره {لله} أي القضاء له بفعل ما يشاء {يخفون في أنفسهم ما لا يبدون} يظهرون {لك يقولون} بيان لما قبله {لو كان لنا من الأمر شيء ما قتلنا ههنا} أي لو كان الاختبار إلينا لم نخرج فلم نقتل لكن أخرجنا كرها {قل} لهم {لو كنتم في بيوتكم} وفيكم من كتب الله عليه القتل {لبرز} خرج {الذين كتب} قضي {عليهم القتل} منكم {إلى مضاجعهم} مصارعهم فيقتلوا ولم ينجهم وقعودهم لأن قضاءه تعالى كائن لا محالة {و} فعل ما فعل بأخذ {ليبتلي} يختبر {الله ما في صدوركم} قلوبكم من الإخلاص والنفاق {وليمحص} يميز {ما في قلوبكم والله عليم بذات الصدور} بما في القلوب لا يخفى عليه شيء وإنما يبتلي ليظهر للناس.