Danish lawmakers on Friday abolished the crime of blasphemy, an offence that has rarely been prosecuted in the Scandinavian country.
Parliament voted 75 to 27 to abolish the almost 100-year-old law.
Only members of the opposition Social Democrats voted against the move.
Blasphemy violations could be punished with a four-month prison sentence or a fine.
“This means that we can have a freer and less prejudiced discussion about religions,’’ Bruno Jerup of the opposition Red-Green Alliance party, which launched the proposal, said.
Meanwhile, prosecutors have gone to trial three times over the blasphemy paragraph since 1938, most recently in 1971.
A case is pending against a 42-year-old man who in December 2015, posted a clip on Facebook showing him burning the Quran in his garden.
The video was shared on the group “Yes to Freedom – No to Islam.”
It was not clear if prosecutors would proceed with the case.
The Justice Ministry said statements or actions that “threaten, mock or denigrate” groups due to their religion remained punishable.
The government said it had reviewed similar moves by Norway and the Netherlands, as well as recommendations from the Council of Europe.
The Office of the Director of Public Prosecutions in 2006 ruled against prosecuting the editors of the Jyllands-Posten newspaper with blasphemy over the publication of 12 controversial caricatures of prophet Mohammed.
The September 2005 publication triggered massive protests, and a consumer boycott of Danish products in the Muslim world.
The Danish security service PET earlier this year cautioned that abolishing blasphemy could increase the security threat.