Abu Dawud Book 6, Hadith Number 2263.
Chapter : Not known.
Narated By Zayd ibn Arqam : Three persons were brought to Ali (Allah be pleased with him) when he was in the Yemen. They and sexual intercourse with a woman during a single state of purity. He asked two of them: Do you acknowledge this child for this (man)? They replied: No. He then put this (question) to all of them. Whenever he asked two of them, they replied in the negative. He, therefore, cast a lot among them, and attributed the child to the one who received the lot. He imposed two-third of the blood-money (i.e. the price of the mother) on him. This was then mentioned to the Prophet (PBUH) and he laughed so much that his molar teeth appeared.