Abu Zabyan narrates from Ali (may Allah be pleased with him) that two men came to Ali (may Allah be pleased with him) who had had intercourse with a woman in one period of purity. He said: The child will be shared between you both, and he belongs to whichever of you survives.
It has also been narrated by another route from Ali (may Allah be pleased with him) in mursal form, and its being established from Ali (may Allah be pleased with him) is doubtful.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الدعوى والبينات / 21287