A woman came to the Prophet ﷺ after her husband had divorced her, and she wanted to take her son. The Messenger of Allah ﷺ said, "Cast lots for him."The man said, "Who would come between me and my son?"So the Messenger of Allah ﷺ said to the boy, "Choose whichever of them you wish." The boy chose his mother, and she took him with her.
حدثنا وكيع قال حدثنا علي بن المبارك عن يحيى بن أبي كثير عن أبي ميمونة
جاءت امرأة إلى النبي ﷺ قد طلقها زوجها فأرادت أن تأخذ ولدها فقال رسول الله ﷺ استهما فيه فقال الرجل من يحول بيني وبين ابني فقال رسول الله ﷺ للابن اختر أيهما شئت فاختار أمه فذهبت به
No references are available.
Its isnad is sahih. Abu Maymuna is Hilal bin Ali bin Usama, and it is also said, Hilal bin Abu Maymuna, a trustworthy narrator.Abu Dawud narrated it, 2/283, no. 2277, in the chapter on divorce, "Who has more right to the child." Ibn Abu Shayba narrated it, 5/237, in the chapter on divorce, and Darimi, 2/223, no. 2293.The scholars have interpreted this hadith as applying to a child under seven years of age.