Ballot sheets at the count centre for the blasphemy referendum in Dublin.
Photograph: Clodagh Kilcoyne/Reuters

Campaigners in Ireland celebrated the end of a “medieval” ban on blasphemy on Saturday, after voters overwhelmingly backed removing the offence from the constitution in a referendum.

The referendum saw 64.85% vote yes to remove the prohibition on blasphemy, with 35.15% in favour of retaining it. A total of 951,650 people voted for the change, with 515,808 opposing the move. The decision on a turnout of 43.79%, was the latest reflection of seismic social and political changes in Ireland, which the taoiseach, Leo Varadkar, has described as a “quiet revolution”.

“It means that we’ve got rid of a medieval crime from our constitution that should never have been there,” said Michael Nugent, chairperson of Atheist Ireland, which had campaigned for years to have blasphemy taken out of the constitution.

Voters also returned president Michael D. Higgins to office, giving the 77-year-old poet and human rights campaigner another seven-year term by a comfortable margin.

Until recently, Ireland was deeply conservative, dominated by the Catholic church, but the country has legalised gay marriage and abortion in popular votes, and is now led by an openly gay taoiseach.

Reflecting the speed of changes in Ireland, the strongest support for ending the ban came from younger voters, exit polls suggested. Four in five voters under 35 backed the change, according to the Irish Times, while over-65s only approved it by a narrow margin, with 52% in favour and 48% against.

The government had already laid out legislation to remove the offence of blasphemy from the constitution and all relevant laws, should the referendum be passed.

It has been over 150 years since anyone was prosecuted for blasphemy in Ireland, but the country had passed a blasphemy law in 2009.

Three years ago, Irish police investigated comments made by comedian Stephen Fry on TV, when he described God as “capricious”, “mean-minded”, and an “utter maniac”. They ultimately dropped the case, deciding that not enough people had been outraged.

Poor turnout slightly undermined the celebrations, with only around 45% of eligible voters casting a ballot, potentially the lowest ever recorded for a presidential vote.

But Nugent said the premlinary result, if confirmed, would be another important step towards realigning national laws with contemporary Irish life.

“The population has moved on, [people are] no longer controlled by the Catholic church, but a lot of the laws that were put in place are still there,” he added. “We have to chip away at them and get the state to catch up with the people.”