Seoul (CNN) South Korea's 66-year abortion ban must be lifted by end of 2020 the country's Constitutional Court ruled Thursday, in a major win for pro-choice advocates.

Seven out of nine judges ruled that outlawing abortion was unconstitutional -- votes from six judges were needed to overturn the ban.

Lawmakers now have until December 31, 2020 to revise the law. Termination of pregnancy after 20-weeks will remain illegal.

Previously, women who had abortions in South Korea could face up to a year in prison and can be fined up to two million won ($1,780), while doctors or healthcare workers who helped terminate a pregnancy could be jailed for up to two years.

While prosecutions were rare, they were not unheard of.

Three-quarters of women aged 15 to 44 regarded the law as unfair, according to results of a survey released this year by the Korea Institute for Health and Social Affairs. Around 20% of respondents said they had had an abortion despite it being illegal.

Recent pressure to decriminalize the practice, however, had seen pushback from conservative and religious groups, some of which have links to US anti-abortion campaigns.

Crime and stigma

When she was 40 years old, Kim Kyung-hee realized she was pregnant. The after-school teacher and her husband already had two daughters and so decided to have an abortion.

In many countries, this would be a simple medical procedure, undertaken with the support of the healthcare system. But in South Korea, Kim was left only with the option of an illegal operation.

While Kim's abortion took place 12 years ago, she said she is still haunted by the knowledge that she committed a crime.

"I felt guilty for getting rid of a life to begin with, but the fact that it was a crime made it emotionally much more difficult," Kim said.

Protests oppose the criminalization of abortion in South Korea.

Kim said finding a clinic to perform the operation wasn't particularly difficult. She simply went to a large obstetrician-gynecologist hospital. "After I had confirmation that I was pregnant ... I told the doctor I wanted an abortion so we scheduled the date and time," she said.

Kim said she left the hospital as soon as the operation was over.

"I wasn't very healthy, so I should have stayed longer to fully recover but I felt that I had to get out," Kim said. She didn't tell her mother or siblings about it at the time.

Kim is not alone. According to the Health Ministry, 50,000 women had an abortion in South Korea last year.

That's down from 168,000 in 2011, according to the official data -- but many doctors disputed these figures saying the criminalization of the practice had distorted reporting of it.

They estimated the actual figure could be 10 times higher than that recorded by the government.

Kim believed the law had put an unjust burden on women.

"Pregnancy doesn't come about by women alone -- but to hold only women responsible makes the law very unfair," she said.

Changing attitudes

In 1953 , South Korea criminalized abortion in most circumstances, with exceptions granted to cases involving rape, incest and genetic disability.

But in the following years, the law appeared to contradict other government policies, social norms and technological advances.

In the early 1960s, for example, the government launched a campaign to reduce the number of children per household, in a bid to get the population size under control.

Traditionally, South Korean couples had preferred sons over daughters, as they could carry on the family name, and so would keep having children until they had a boy. The new policy combined with the abortion ban left them with fewer legal options.

JUST WATCHED Abortion advocacy sweeping through Catholic nations Replay More Videos ... MUST WATCH Abortion advocacy sweeping through Catholic nations 04:24

Around the same time, however, access to ultrasound technology allowed more people to know the sex of their unborn child. Some parents began aborting female fetuses -- illegally. The severe social stigma against unmarried mothers was another factor that led women to seek abortions.

Even recently, women who had a child outside of marriage were often ostracized and cutoff from family support. Many chose to stay at shelters run by the government, religious groups and adoption centers.

Times changing

The Constitutional Court almost legalized abortion in 2012, said Cho Hee-kyoung, a law professor at Seoul's Hongik University. "The court was actually split. It was four to four and there was no deciding vote because, at the time, one seat was vacant."

Pressure to reform the law has been growing since then, both domestically and internationally. Pro-choice were emboldened by Ireland's landslide vote to legalize abortion , in a country where the stringently anti-choice Catholic Church has far more influence.

Current South Korean President Moon Jae-in, who is a Catholic, appointed six of the current nine Judges on the Constitutional Court. Though Moon has not spoken publicly about this issue, he has been supportive of gender equality and in favor of protecting rights for minorities.

In 2017, more than 235,000 people signed a petition to legalize abortion. In response, the government promised better sex education, more support for single mothers, and to research the issue.

Even some of the churches that oppose the legalization in principle disagree on imposing punishment solely on women.

Protests

The case before the Constitutional Court this week began after a doctor filed a petition against the law after he was indicted for carrying out an abortion of a less than three-month-old fetus in 2014.

The doctor claimed that the abortion ban violated his right to pursue happiness, to equality and freedom of occupation.

As ruling for the case approached, both anti- and pro-choice groups took to the streets of Seoul to make their case.

On April 6, about 1,000 anti-abortion protesters gathered in Seoul for a "March for Life," modeled on the US campaign of the same name. They bore placards with slogans such as "abortion is murder" and "both women and fetuses must be protected." Last week, Archibishop of Seoul, Andrew Yeom Soo-jung, said in a statement that "the pain for women derives from the situation that pushes them towards an abortion not from the criminal laws."

Yeom urged society "to focus on saving both women and fetuses rather than only focusing on the legalization of abortion."

JUST WATCHED Ireland decides: Reactions from Dublin Replay More Videos ... MUST WATCH Ireland decides: Reactions from Dublin 02:16

Meanwhile, activist Hong Yeon-ji, who attended a pro-choice rally along with hundreds of women a week before, said the current law was "abused by male partners as it penalizes the women who have the operation and the doctors who perform the operation."

She said that many doctors who performed illegal abortions were not properly trained and the surgery methods they used had not been updated in years because the act itself was illegal.

At the Korea Womenlink center, one of the largest women's activist groups in South Korea, where she works, Hong said she had encountered cases of men threatening their partners with being reported to the police for having an abortion, either to hurt them when a relationship broke down or to blackmail them for money.

Last month, South Korea's own human rights watchdog, the National Human Rights Commission of Korea (NHRCK), said that the current law was unconstitutional.

"In a democratic nation, people are not coerced to get pregnant and therefore the rights to terminate pregnancy should be safeguarded too," the NHRCK said in a statement.

"All couples and individuals should be able to freely decide on the number of children they have and when to have them."

This story has been updated to correct the number of judges appointed to the Constitutional Court by Moon Jae-in; the update also clarifies the age of the aborted fetus referenced in the case before the court this week.