Sunan Abi Dawud, Hadith 2262

Narrated Zayd ibn Arqam: I was sitting with the Prophet. A man came from the Yemen, and said: Three men from the people of the Yemen came to Ali, quarrelling about a child, asking him to give a decision. They had had sexual intercourse with a woman during a single state of purity. He said to two of them: Give this child to this man (the third person) with pleasure. But they (refused and) cried loudly. Again he said to two of them: Give the child to the man (the third person) willingly. But they (refused and) cried loudly. He then said: You are quarrelsome partners. I shall cast lots among you; he who receives the lot, will acquire the child, and he shall pay two-thirds of the blood-money to both his companions. He then cast lots among them, and gave the child to the one who received the lot. The Messenger of Allah laughed so much that his canine or molar teeth appeared.

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنِ الأَجْلَحِ، عَنِ الشَّعْبِيِّ، عَنْ عَبْدِ اللَّهِ بْنِ الْخَلِيلِ، عَنْ زَيْدِ بْنِ أَرْقَمَ، قَالَ كُنْتُ جَالِسًا عِنْدَ النَّبِيِّ صلى الله عليه وسلم فَجَاءَ رَجُلٌ مِنَ الْيَمَنِ فَقَالَ إِنَّ ثَلاَثَةَ نَفَرٍ مِنْ أَهْلِ الْيَمَنِ أَتَوْا عَلِيًّا يَخْتَصِمُونَ إِلَيْهِ فِي وَلَدٍ وَقَدْ وَقَعُوا عَلَى امْرَأَةٍ فِي طُهْرٍ وَاحِدٍ فَقَالَ لاِثْنَيْنِ مِنْهُمَا طِيبَا بِالْوَلَدِ لِهَذَا ‏.‏ فَغَلَيَا ثُمَّ قَالَ لاِثْنَيْنِ طِيبَا بِالْوَلَدِ لِهَذَا ‏.‏ فَغَلَبَا ثُمَّ قَالَ لاِثْنَيْنِ طِيبَا بِالْوَلَدِ لِهَذَا ‏.‏ فَغَلَبَا فَقَالَ أَنْتُمْ شُرَكَاءُ مُتَشَاكِسُونَ إِنِّي مُقْرِعٌ بَيْنَكُمْ فَمَنْ قُرِعَ فَلَهُ الْوَلَدُ وَعَلَيْهِ لِصَاحِبَيْهِ ثُلُثَا الدِّيَةِ ‏.‏ فَأَقْرَعَ بَيْنَهُمْ فَجَعَلَهُ لِمَنْ قُرِعَ فَضَحِكَ رَسُولُ اللَّهِ صلى الله عليه وسلم حَتَّى بَدَتْ أَضْرَاسُهُ أَوْ نَوَاجِذُهُ ‏.‏

sunnah.com