Even if we acknowledge that a foetus is a person, it has an inalienable right to life, and to abort it is tantamount to murder. That doesn't mean that a foetus has any more right to live than the mother. In cases where continuing the pregnancy to the full term puts the mother's life in danger, then difficult choices have to be made.
In these cases, it should be permissible for a mother to have an abortion. In much the same way as killing another person is morally justified if that person was trying to kill you, so it is morally acceptable to terminate a pregnancy if the foetus puts the mother's life at risk. Even though the foetus represents a threat to the mother's life unintentionally, it nonetheless, poses a threat. Therefore, it is reasonable to permit the termination of the pregnancy.
The mother knowingly bought the danger unto herself by choosing to become pregnant. Therefore, she is not acting in pure self-defence. As a result, abortions carried out to save the mother's life are not an act of self-defence and should not be permitted. Even in cases where the mother's life is at risk, neither the parents nor the doctor should be permitted to take any measures that would deliberately end one or the other's life. The physician has the responsibility to do everything in his or her power to save both lives. If the child dies as an unintended consequence of treatment, then this is not an abortion and the physician and parents are morally justified. However, if the child is deliberately killed, this is unacceptable and there must be legal sanctions in place to punish those responsible.
[P1] A mother has as much right to life as a foetus. [P2] If the foetus threatens that right to life, it can be terminated in an act of self-defence. [P3] Self-defence is a morally acceptable reason to take the life of another human. [P4] Therefore, abortions should be acceptable in cases where the mother's right to life is endangered.
Rejecting the premises
[Rejecting P2] This would not fall under self-defence as the foetus is not deliberately attacking the mother. Also, the mother willingly became pregnant and was presumably well aware of the risks associated with pregnancy.