A woman came to the Messenger of Allah ﷺ and said, "May my father and mother be your ransom, my husband wants to take my son away, though he has been a help to me and has brought me water from the well of Abu Inabah."Then her husband came and said, "Who will dispute with me over my son?"The Messenger of Allah ﷺ said, "Boy, this is your father and this is your mother. Take the hand of whichever of them you wish."So he took his mother's hand, and she went off with him.
أخبرنا محمد بن عبد الأعلى قال حدثنا خالد قال حدثنا ابن جريج قال أخبرني زياد عن هلال بن أسامة عن أبي ميمونة قال بينا أنا عند
إن امرأة جاءت رسول الله ﷺ فقالت فداك أبي وأمي إن زوجي يريد أن يذهب بابني وقد نفعني وسقاني من بئر أبي عنبة فجاء زوجها وقال من يخاصمني في ابني فقال يا غلام هذا أبوك وهذه أمك فخذ بيد أيهما شئت فأخذ بيد أمه فانطلقت به
[Its isnad is sahih]. Abu Dawud narrated it in the Book of Divorce, chapter on who has more right to the child, hadith 2277, from the hadith of Ibn Jurayj, with this wording. It is also found in Kubra, hadith 5690. Tirmidhi said in hadith 1357, hasan sahih. Ziyad is Ibn Saad.