The tiny, picturesque republic, situated on a mountainside in the centre of Italy, was one of the last in Europe along with Malta, Andorra and the Vatican to have a total ban on terminating a pregnancy.
With final results declared, 77.28 percent of voters approved a motion to allow the termination of a pregnancy up to 12 weeks.
After the 12-week mark, abortion would only be allowed if the mother’s life was in danger or in the case of foetal abnormalities that could harm the woman physically or psychologically.
More than 35,000 voters, a third of them living abroad, were eligible to vote in the referendum initiated by the San Marino Women’s Union (UDS). The turnout was just over 41 percent, the ministry figures showed.
In the absence of opinion polls, nobody had wanted to call the result beforehand.
Before the result came in, Francesca Nicolini, a 60-year-old doctor and member of UDS, had argued: “The majority of young people are on our side, because it’s an issue that directly affects their lives.
“It’s unacceptable to view women who are forced to have abortions as criminals.”
The influence of the Catholic Church remains strong here, and Pope Francis last week reiterated his uncompromising position that abortion is “murder”.
After the result, campaigners for the change wanted swift action in parliament.
“It’s a clear victory,” campaigner Vanessa Muratori told local television. “We are now waiting for a law to match the results.”
Currently, abortion carries a penalty of up to three years in prison for the woman and six years for the doctor who conducts the procedure.
However, nobody has ever been convicted. Women who choose to have an abortion typically cross into Italy, where it has been legal for more than 40 years.
Opposition to decriminalising abortion was led by the ruling Christian Democratic Party, which has close ties to the Catholic Church and which called for a “No” vote to “defend the right to life”.
But its deputy secretary Manuel Ciavatta had told AFP before the referendum that his party, which has just over a third of MPs, would respect the result.
“The population is very divided on the issue,” he told AFP last week.
“And even in parliament, there are members of progressive parties who are against abortion, and MPs from the right who are in favour of abortion rights, notably in cases of rape or foetal abnormalities.”
His party would “respect the voice of the voters”, he added.
Parliament must now act to make the change law.
The vote signals a radical change for San Marino, where the ban dates back to 1865 and was confirmed by both the fascist regime in the early 20th century and then again in 1974.
Figures from Italy suggest few women from the tiny state cross the border to take advantage of the abortion laws there.
Between 2005 and 2019, only about 20 women a year from San Marino had abortions in Italy, falling to 12 in 2018 and seven in 2019, according to official Istat data cited by the campaigners against abortion.