BY ITS fifth month, Beatriz’s pregnancy had become dangerously complicated. Scans showed that the fetus was developing without parts of its brain and skull and would not survive more than a few hours outside the womb. Beatriz (not her real name) was suffering from kidney problems and lupus, an autoimmune disease, which had become so acute that her doctors said she risked death too. With the backing of El Salvador’s health ministry, she decided to terminate the pregnancy.

Not so fast, said the Supreme Court, ruling on May 29th that the constitution’s protection of all citizens “from the moment of conception” meant that abortion could not be permitted in any circumstances. Hours later, the Inter-American Court of Human Rights ordered that the government should give Beatriz’s doctors access “without interference” to whatever measures were necessary to save her life.

A compromise was reached: rather than have an abortion, Beatriz could undergo a premature caesarean section. Since she was already past 20 weeks of pregnancy, the operation could be considered an “induced birth”, not an abortion, the health ministry said. This seemed to satisfy the courts. On June 3rd the baby was delivered, and died a few hours later. Beatriz was in intensive care as The Economist went to press.

This sorry story and its face-saving solution is typical of the ineffective abortion regime present in most of Latin America. At the urging of the Catholic church, abortion is banned under all circumstances—including rape, and where the mother faces death—in Chile, the Dominican Republic, Haiti, Honduras, Nicaragua and Suriname, as well as in El Salvador. In most other countries it is highly restricted. Only Cuba, Guyana, Puerto Rico and Uruguay offer abortion on demand (so does Mexico City, unlike the rest of Mexico).

The past decade has seen some liberalisation. Mexico City and Uruguay both legalised abortion in the first 12 weeks of pregnancy, while Argentina, Brazil and Colombia made it possible in certain cases including rape and to save the mother’s life. A bill before Brazil’s Congress would allow abortion on broader terms.

But already there is a backlash. More than half of Mexico’s states have changed their constitutions to define life as beginning at conception since abortion was legalised in the capital in 2007. Even in countries where abortion is permitted, ambiguous laws and stigma lead doctors, judges and government officials to obstruct the procedure, according to Lilian Sepúlveda of the Centre for Reproductive Rights, a New York-based pressure group.

Beatriz is by no means unique. Last year in the Dominican Republic a teenager with leukaemia died when her doctor delayed chemotherapy for fear of being accused of terminating her pregnancy. In 2011 a 12-year-old Nicaraguan girl who had been raped by her own stepfather was forced to give birth. More than 1,000 women in the region die and 1m are hospitalised every year owing to complications resulting from backstreet abortions, according to the World Health Organisation.