كتاب التوبة
50  
The Book of Repentance
(4)
Chapter: The Vastaess Of Allah's Mercy, Which Prevails Over His Wrath
(4)
باب فِي سَعَةِ رَحْمَةِ اللَّهِ تَعَالَى وَأَنَّهَا سَبَقَتْ غَضَبَهُ ‏‏
Sahih Muslim 2754

'Umar b. Khattab reported that there were brought some prisoners to Allah's Messenger (ﷺ) amongst whom there was also a woman, who was searching (for someone) and when she found a child amongst the prisoners, she took hold of it, pressed it against her chest and provided it suck. Thereupon Allah's Messenger (ﷺ) said:

Do you think this woman would ever afford to throw her child in the Fire? We said: By Allah, so far as it lies in her power, she would never throw the child in Fire. ' Thereupon Allah's Messenger (ﷺ) said: Allah is more kind to His servants than this woman is to her child.
حَدَّثَنِي الْحَسَنُ بْنُ عَلِيٍّ الْحُلْوَانِيُّ، وَمُحَمَّدُ بْنُ سَهْلٍ التَّمِيمِيُّ، - وَاللَّفْظُ لِحَسَنٍ - حَدَّثَنَا ابْنُ أَبِي مَرْيَمَ، حَدَّثَنَا أَبُو غَسَّانَ، حَدَّثَنِي زَيْدُ بْنُ أَسْلَمَ، عَنْ أَبِيهِ، عَنْ عُمَرَ بْنِ الْخَطَّابِ، أَنَّهُ قَالَ قَدِمَ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم بِسَبْىٍ فَإِذَا امْرَأَةٌ مِنَ السَّبْىِ تَبْتَغِي إِذَا وَجَدَتْ صَبِيًّا فِي السَّبْىِ أَخَذَتْهُ فَأَلْصَقَتْهُ بِبَطْنِهَا وَأَرْضَعَتْهُ فَقَالَ لَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ أَتَرَوْنَ هَذِهِ الْمَرْأَةَ طَارِحَةً وَلَدَهَا فِي النَّارِ ‏"‏ ‏.‏ قُلْنَا لاَ وَاللَّهِ وَهِيَ تَقْدِرُ عَلَى أَنْ لاَ تَطْرَحَهُ ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ لَلَّهُ أَرْحَمُ بِعِبَادِهِ مِنْ هَذِهِ بِوَلَدِهَا ‏"‏ ‏.‏
Reference : Sahih Muslim 2754
In-book reference : Book 50, Hadith 26
USC-MSA web (English) reference : Book 37, Hadith 6635
  (deprecated numbering scheme)