Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: "Slaughtering the mother of the fetus counts as the slaughter of the fetus as well."
(b) Ibn Ka'b bin Malik (may Allah have mercy on him) says that the Companions (may Allah be pleased with them) used to say about the fetus: When it has grown hair, the slaughter of its mother counts as its slaughter.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / 19492