CNN  — 

The tiny landlocked republic of San Marino voted overwhelmingly on Sunday to legalize abortion under certain circumstances, according to official results published by the country’s state secretariat of internal affairs.

Around 77.30% of voters approved the measure which would make abortion legal in the first 12 weeks of pregnancy. The vote will also make it legal for woman to get an abortion beyond 12 weeks if the pregnancy is life threatening for the woman, or anomalies and malformations of the fetus arise that pose a serious health risk to the woman.

Turnout for the referendum was low at 41.11% for the majority Catholic republic.

The microstate’s Secretary of the Interior, Elena Tonnini, hopes to draft up a law based on the vote as soon as possible, according to public broadcaster San Marino RTV.

A woman casts her ballot for the abortion referendum at a polling station in San Marino, on September 26.

The referendum result overturned a law dating back to 1865.

The vote in the northern Italian enclave of 33,000 people comes as authorities in countries such as Poland and the US state of Texas have tightened abortion laws. Earlier this month, Mexico’s Supreme Court ruled that penalizing abortion is unconstitutional.

Up to now in San Marino, women who ended their pregnancies risked three years’ imprisonment. The term is twice as long for anyone who carries out an abortion.

San Marino women wanting an abortion normally went to Italy, where they could only get one privately, at a cost of about 1,500 euros ($1,765).

Elsewhere in Europe, the Mediterranean island of Malta, and the micro-states of Andorra and Vatican City, another Italian enclave, still ban abortion.

In Europe’s last referendum on abortion, the British Overseas Territory of Gibraltar voted in June to ease what remain extremely strict curbs. Ireland legalized abortion in a far higher-profile referendum in 2018.

Social progress has tended to be slow in San Marino. Women did not get the right to vote until 1960, 14 years after surrounding Italy, and have only been allowed to hold political office since 1974. Divorce was legalized in 1986, some 16 years after Italy.

Additional reporting by Reuters.