Malik related to me from Yahya ibn Said from Sulayman ibn Yasarthat Umar ibn al-Khattab used to attach the children of the Jahiliyyato whoever claimed them in Islam. Two men came and each of themclaimed a woman's child. Umar ibn al-Khattab summoned a person whoscrutinized features and he looked at them. The scrutinizer said,"They both share in him." Umar ibn al-Khattab hit him with a whip.Then he summoned the woman, and said, "Tell me your tale." She said,"It was this one (indicating one of the two men) who used to come tome while I was with my people's camels. He did not leave me until hethought and I thought that I was pregnant. Then he left me, and bloodflowed from me, and this other one took his place. I do not know fromwhich of them the child is." The scrutinizer said, "Allah is greater."Umar said to the child, "Go to whichever of them you wish."
USC-MSA web (English) reference: Book 36, Hadith 22
Arabic reference: Book 36, Hadith 1426