The Prophet said: "The child is not prayed over, nor does he inherit, nor is he inherited from until one is sure he was alive at birth."
Jami` at-Tirmidhi Book 10, Hadith 68