San Marino citizens have rejected a 150-year old abortion law as they voted to legalize abortion in the country on Sunday.

The move makes the tiny republic the latest majority Catholic state to approve the procedure under certain circumstances.

The referendum carried as almost 77% of voters said yes to a proposal calling for abortion to be legal in the first 12 weeks of pregnancy, according to official returns broadcast on San Marino RTV. Beyond that point, the procedure would be legal in case of danger to the woman’s life or if her physical or psychological health is at risk because of fetal anomalies or malformations.

Also read: House passes legislation to protect abortion rights amid state challenges

San Marino’s Parliament must now draft a bill to legalize the procedure. Only 41% of the voters came out to vote for the referendum in a country with a population of 33,000 people.

San Marino, one of the world’s oldest republics, had been one of the last European states that still criminalized abortion. With Sunday’s result, it now joins other predominantly Catholic states like Ireland, which legalized abortion in 2018, and neighboring Italy, where abortion has been legal since 1978. Abortion is still illegal in Malta and Andorra, and Poland introduced a near-total ban on the procedure this year.

The San Marino referendum was set after around 3,000 people signed a petition drive to overturn the microstate’s abortion law, which dates from 1865.

Women in San Marino seeking an abortion usually go to neighboring Italy for the procedure. But proponents of the referendum argued that put an undue financial burden on them and penalized women who got pregnant as a result of rape.

The Vatican firmly opposes abortion, holding that human life begins at conception and that all life must be protected from conception until natural death.

“For us, it is inconceivable that a mother resorts to abortion because of some economic troubles,”  Vatican News quoted a representative as saying.

(With inputs from the Associated Press)