There was no question that the baby of a woman known only as "Beatriz" would have a very short life. But doctors were worried that Beatriz's life would also be put at risk by the pregnancy.
Fortunately, El Salvador's Health Ministry announced today that doctors performed a life-saving C-section on Beatriz, a 22-year-old woman, on Monday. The child died five hours later, but Beatriz survived and is in stable condition, officials say.
Yet the fact that Beatriz was so close to death before doctors could intervene reflects the disturbing nature of El Salvador's strict abortion laws. Beatriz needed an abortion, but El Salvador prohibits all abortions, even when the mother's life is at risk.
More from GlobalPost: El Salvador's strict abortion laws a 'form of torture,' say rights groups
Last week, Beatriz's attorneys warned that she would likely die from her risky pregnancy, along with her baby. And three sonograms confirmed that Beatriz's 27-week-old fetus had been developing without a full brain or skull, a condition called anencephaly that is almost always fatal for the baby.
The revelation did not phase El Salvador's Supreme Court, which ruled to deny Beatriz her request for an abortion.
The C-section provided a way for doctors to cut Beatriz's risky pregnancy short without breaking abortion laws and getting arrested. Doctors had prepped for the C-section ahead of time so they could quickly perform it when her health started to fail, the Health Ministry added.
Despite the relatively happy ending for Beatriz, the news does not bode well for the rights of other expectant mothers. In its ruling, the El Salvador Supreme Court said: "The rights of the mother cannot be privileged over those of the unborn child."