Blasphemy is to be decriminalised in the Republic of Ireland after voters overwhelming supported a referendum to remove it as an offence in Irish law.
The result, announced late on Saturday night, saw 64.85% of the electorate voting Yes to decriminalise blasphemy, while 35.15% voted No.
Blasphemy has been an offence for centuries but was not defined in Irish law until the Defamation Act of 2009.
Both the 2009 Act and the 1937 Irish Constitution will now be amended.
Justice Minister Charlie Flanagan welcomed the result, saying there was "no room for a provision such as this in our constitution".
"Ireland is rightly proud of our reputation as a modern, liberal society."
The referendum took place on the same day as voters went to the polls to elect the Irish president, which saw Michael D Higgins returned for a second seven-year term.
The last successful conviction for blasphemy in Ireland was in 1703 and the last attempted prosecution was in 1855 - both cases were taken when Ireland was under British rule.
Stephen Fry case
Many voters were unaware that such an offence existed in modern Irish law until 2015, when the actor and broadcaster Stephen Fry was investigated over comments he made in a TV interview.
Mr Fry had been asked by an RTÉ programme what he would say to god if there was an afterlife.
He replied that he would ask why the world had been created with "such misery" and cited children with bone cancer as an example of suffering.
"Why should I respect a capricious, mean-minded stupid god who creates a world so full of injustice and pain?" the actor said.
"The god that created this universe, if it was created by a god, is quite clearly a maniac, utter maniac, totally selfish."
A member of the public made a formal complaint about Mr Fry's comments to gardaí (Irish police).
Officers investigated the matter under the 2009 Defamation Act, which stated that anyone convicted of uttering or publishing "blasphemous matter" could be fined up to 25,000 euros (£22,300).
The Act defined blasphemous matter as "grossly abusive or insulting in relation to matters held sacred by any religion, thereby causing outrage among a substantial number of the adherents of that religion".
In 2017, the Stephen Fry investigation was dropped, reportedly because officers could not find a substantial number of people that had been outraged by his remarks.
The last person to be prosecuted for blasphemy in Ireland was a Catholic priest who was accused of burning a bible in Kingstown (now called Dún Laoghaire) in 1855.
Fr Vladimir Petcherine argued in court that he was attempting to burn "evil" literature and did not realise a bible was among the pile of books on his bonfire.
The priest was found not guilty.
Sixteen years after achieving independence from Britain, the Republic of Ireland drew up a new constitution which included a clause on blasphemy.
The 1937 Constitution states: "The publication or utterance of blasphemous, seditious, or indecent matter is an offence which shall be punishable in accordance with law."
However, blasphemous matter was not defined until 2009, when it was included in an overhaul of defamation legislation.
The then Justice Minister Dermot Ahern faced criticism from many liberal commentators for what they saw as curtailing freedom of speech.
At the time, Mr Ahern admitted blasphemy was an "arcane concept" and said he would prefer to abolish the offence, but that would require a referendum.
The Republic of Ireland was then caught in the middle of a major banking crisis which was putting the state's solvency at risk, and a referendum would have been seen as an unnecessary expense on the public purse.
Friday's referendum was purposely organised in tandem with the presidential election.
The turnout was 43.79% and 951,650 people voted to decriminalise blasphemy.
Mr Ahern's current successor, Charlie Flanagan, will now work to remove the word "blasphemous" from Article 40.6.1 of the constitution.
The justice minister will now also move to repeal sections 36 and 37 of the Defamation Act 2009.