Hadithcore
Hadith #2114270

Narrated 'Abdullah bin 'Amr (RA):

A woman said, "O Allah's Messenger (ﷺ) , this son of mine: my womb was a receptacle for him, my breasts were a source of suckling for him, and my lap was a place for him to curl up in, yet his father has divorced me and wants to take him away from me." Allah's Messenger (ﷺ) replied to her, "You have more right to him as long as you do not remarry." [Reported by Ahmad and Abu Dawud. al-Hakim graded it Sahih (authentic)].

عَنْ عَبْدِ اَللَّهِ بْنِ عَمْرِوٍ رَضِيَ اَللَّهُ عَنْهُمَا; أَنَّ اِمْرَأَةً قَالَتْ: { يَا رَسُولَ اَللَّهِ! إِنَّ اِبْنِي هَذَا كَانَ بَطْنِي لَهُ وِعَاءً, وَثَدْيِي لَهُ سِقَاءً, وَحِجْرِي لَهُ حِوَاءً, وَإِنَّ أَبَاهُ طَلَّقَنِي, وَأَرَادَ أَنْ يَنْتَزِعَهُ مِنِّي.‏ فَقَالَ لَهَا رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-

أَنْتِ أَحَقُّ بِهِ, مَا لَمْ تَنْكِحِي

.‏ } رَوَاهُ أَحْمَدُ, وَأَبُو دَاوُدَ, وَصَحَّحَهُ اَلْحَاكِمُ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 8, Hadith 216
Arabic/English book reference
Book 8, Hadith 1162