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.
nasai-kubra:1982Hannād b. al-Sarī > Abū al-Aḥwaṣ > ʿAṭāʾ b. al-Sāʾib > ʿIkrimah > Ibn ʿAbbās

"When a young daughter of the Messenger of Allah was dying, the Messenger of Allah picked her up and held her to his chest, then he put his hand on her, and she died in front of the Messenger of Allah. Umm Ayman wept and the Messenger of Allah said 'Oh Umm Ayman, do you weep while the Messenger of Allah is with you?' She said: 'Why shouldn't I weep when the Messenger of Allah is weeping." So the Messenger of Allah said "Verily, I am not weeping. Rather it is compassion.' Then the Messenger of Allah said: 'The believer is fine whatever the situation; even when his soul is being pulled from his body and he praises Allah, the Mighty and Sublime"' (Using translation from Nasāʾī 1843)   

الكبرى للنسائي:١٩٨٢أَخْبَرَنَا هَنَّادُ بْنُ السَّرِيِّ قَالَ حَدَّثَنَا أَبُو الْأَحْوَصِ عَنْ عَطَاءِ بْنِ السَّائِبِ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ قَالَ

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


See similar narrations below:

Collected by Nasāʾī
nasai:1843Hannād b. al-Sarī > Abū al-Aḥwaṣ > ʿAṭāʾ b. al-Sāʾib > ʿIkrimah > Ibn ʿAbbās

"When a young daughter of the Messenger of Allah was dying, the Messenger of Allah picked her up and held her to his chest, then he put his hand on her, and she died in front of the Messenger of Allah. Umm Ayman wept and the Messenger of Allah said 'Oh Umm Ayman, do you weep while the Messenger of Allah is with you?' She said: 'Why shouldn't I weep when the Messenger of Allah is weeping." So the Messenger of Allah said "Verily, I am not weeping. Rather it is compassion.' Then the Messenger of Allah said: 'The believer is fine whatever the situation; even when his soul is being pulled from his body and he praises Allah, the Mighty and Sublime"'  

النسائي:١٨٤٣أَخْبَرَنَا هَنَّادُ بْنُ السَّرِيِّ قَالَ حَدَّثَنَا أَبُو الأَحْوَصِ عَنْ عَطَاءِ بْنِ السَّائِبِ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسِ قَالَ

لَمَّا حُضِرَتْ بِنْتٌ لِرَسُولِ اللَّهِ ﷺ صَغِيرَةٌ فَأَخَذَهَا رَسُولُ اللَّهِ ﷺ فَضَمَّهَا إِلَى صَدْرِهِ ثُمَّ وَضَعَ يَدَهُ عَلَيْهَا فَقَضَتْ وَهِيَ بَيْنَ يَدَىْ رَسُولِ اللَّهِ ﷺ فَبَكَتْ أُمُّ أَيْمَنَ فَقَالَ لَهَا رَسُولُ اللَّهِ ﷺ يَا أُمَّ أَيْمَنَ أَتَبْكِينَ وَرَسُولُ اللَّهِ ﷺ عِنْدَكِ فَقَالَتْ مَا لِي لاَ أَبْكِي وَرَسُولُ اللَّهِ ﷺ يَبْكِي فَقَالَ رَسُولُ اللَّهِ ﷺ إِنِّي لَسْتُ أَبْكِي وَلَكِنَّهَا رَحْمَةٌ ثُمَّ قَالَ رَسُولُ اللَّهِ ﷺ الْمُؤْمِنُ بِخَيْرٍ عَلَى كُلِّ حَالٍ تُنْزَعُ نَفْسُهُ مِنْ بَيْنِ جَنْبَيْهِ وَهُوَ يَحْمَدُ اللَّهَ ﷻ