MEXICO CITY — Beatriz spends her days in a hospital room, anxiously watching her belly grow.

Her doctors say she is inching along a high-risk pregnancy that could ultimately kill her, fraught with risks caused by lupus and other complications. The fetus itself has such a severe birth defect that it has almost no chance of surviving, they say, urging an end to the pregnancy to protect Beatriz’s health before it gets worse. But in El Salvador, where she lives, abortion is illegal under any circumstances.

Now she is waiting for the Salvadoran Supreme Court to rule on her case, which has quickly become a focal point in a broad battle over abortion in Latin America, a largely conservative region where the Roman Catholic Church holds considerable sway.

Long home to some of the world’s most stringent abortion laws, the region has begun experiencing a shift in recent years, with some nations loosening restrictions or even legalizing the procedure. Now Beatriz’s case is testing the limits of El Salvador’s law, one of the more ironclad bans the region still has, by challenging whether abortion should remain off limits even when the mother is at risk and the baby has little hope of survival.

“I don’t want to die,” Beatriz, 22, said in a telephone interview, explaining her reason for seeking an abortion. “I want to be with my boy, taking care of him.”