In its ruling, the court called the anti-abortion law “an unconstitutional restriction that violates a pregnant woman’s right to choose.” But it left it to Parliament to decide whether to restrict abortions in the late stages of a pregnancy.

In South Korea, abortion is widespread despite the ban, which allows exceptions such as in cases of rape or when a woman’s health is at risk. Under the country’s criminal code, a woman who undergoes an abortion can be punished with up to a year in prison or a fine of up to 2 million won, about $1,750. A doctor who performs an abortion faces up to two years in prison.

But the ban on abortion has rarely been enforced. In 2017 alone, 49,700 abortions took place, nearly 94 percent of them illegally, according to estimates released in February by the government-run Korea Institute for Health and Social Affairs. Between 2012 and 2017, just 80 women or doctors went to trial for their involvement in abortions, and only one of them served time in prison, with the rest receiving fines or suspended jail terms, according to court data.

Until recently, abortion carried little of the emotional or religious significance in South Korea that it does in many Western countries.

In the 1970s and 1980s, as the government struggled to curtail population growth, it told families that “two children are one too many” and looked the other way as abortions became widespread.