Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says that the Messenger of Allah (peace and blessings be upon him) said about the fetus: "The slaughter of its mother counts as the slaughter of the fetus, whether it has grown hair or not."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / 19494