One of the most difficult questions in Jewish law is: under what circumstances is terminating a pregnancy justified? Let us first review the basics.
On one hand, it is clear that one may not kill a fetus, whether directly or indirectly. Not only that, we desecrate Shabbat in order to save a fetus, even within forty days of conception, because this fetus will one day be a living human, and the Sages say, “Desecrate one Shabbat on his behalf, so that he can observe many [future] Shabbatot” (Yoma 85b). Since the fetus will be a living person in the future, the same logic applies to saving it (Behag; Rambam; Peninei Halakha: Shabbat 27:3).
On the other hand, it is clear that as long as the fetus is in its mother’s womb, it does not have the status of a living human being. Therefore, even though someone who kills another person is liable for the death penalty, someone who kills a fetus is not. Additionally, since a fetus is not yet considered human life, it does not inherit like one who was already born, and it does not become ritually impure if its mother comes into contact with a corpse. A fetus becomes a bona fide human being only at the moment of birth (Nidda 44a-b).
Thus, an unborn fetus has an intermediate status – it will become a person, but is not a person yet.
We further learn that when there is a conflict between the life of the fetus and the life of the mother, the mother’s life takes precedence. As the Mishna states, “If a woman is suffering from a difficult labor, we cut up the fetus inside her and remove it limb by limb, because her life takes precedence over its life” (m. Ohalot 7:6). Even if the fetus will be born any moment, it may be killed in order to save its mother’s life. However, from the moment of birth, that is, from the moment its head or most of its body emerges, he is considered a living human being. Even if the mother’s life is clearly in danger, it is forbidden to kill the baby in order to save her, because “one life does not supersede another” (ibid.). We do not kill one person in order to save another.
Rambam writes, however (MT, Laws of a Murderer and Saving Lives 1:9):
We are commanded not to show compassion for a rodef. Therefore, the Sages teach that if a pregnant woman is having a dangerously difficult birth, it is permissible to destroy the fetus inside her, whether with drugs or a knife, since it is like a rodef trying to kill her. However, once its head has emerged, we do not harm him, for one life does not supersede another, and this is the nature of the world.
Some wish to derive from this ruling that killing a fetus is like murder, and is permissible only to save the mother, “since it is like a rodef trying to kill her” (Igrot Moshe, ḤM 2:69). However, this cannot be derived from the Talmud. The Talmud mentions rodef only in order to make the point that it is permissible to take the life of the fetus even after parturition has begun. The implication is that before that point, there is no doubt that killing it is permissible, because it is not yet a living being. Some understand Rambam this way as well. As long as the fetus remains in the womb, it is clearly permissible to take its life in order to save the mother’s. Once parturition has begun, though, one might claim that the fetus is close to being considered human life. Therefore, Rambam needs to provide a reason for allowing the fetus to be killed. He does so by declaring the fetus a rodef (Aḥiezer 3:72).
There are additional explanations for Rambam’s designating the fetus as a rodef. I will present several: Declaring the fetus a rodef means that it can be killed even in a degrading way, such as dismemberment (Responsa Ge’onei Batra’i §45). Alternatively, the rationale of rodef is introduced to make clear that the permission to abort applies to Noaḥides as well, even though Noaḥides are normally liable to be put to death for killing a fetus (see R. Akiva Eger on m. Ohalot 7:6). Others explain that Rambam uses the words “like a rodef” as a rhetorical flourish, to make the law more palatable, but this should not lead us to conclude that killing a fetus is considered murder (Seridei Esh, ḤM 162:12). Similarly, Rav Naḥum Rabinovitch writes that the law concerning a fetus is not literally like that of a rodef, for the rodef must be warned of the consequences of his action, while obviously a fetus cannot be warned. Rather, when Rambam says that the fetus is like a rodef, he means that we save the mother by any means possible (Yad Peshuta). There are other interpretations as well, all of which conclude that Rambam does not consider a fetus to be a living being. See Tzitz Eliezer 9:51:3:1, which discusses this at length.