MEXICO CITY — The woman’s doctors urged an end to her pregnancy, saying her life could be at risk and that the fetus would not survive anyway. El Salvador’s highest court rejected the plea, knocking down a challenge to one of the strongest anti-abortion laws in the world.

But on Tuesday, less than a week later, the woman, known publicly only as Beatriz, was recovering from a Caesarean section that ended her high-risk pregnancy after almost seven months of gestation, raising a fundamental question: Did doctors in a country that bans abortion under any circumstances manage to terminate the pregnancy without violating the law?

The answer lies in El Salvador’s terse and stringent law itself, doctors said. With no guidance on how to proceed in complicated cases or a clear definition of what constitutes an abortion, they say, the country’s strict penal code has left itself open to interpretation.

The court seemed to recognize the ambiguity even as it ruled, 4 to 1, against Beatriz’s appeal, citing the government’s “absolute impediment to authorize the practice of abortion.”