A Danish man who posted a video of himself burning the Quran on Facebook will not stand trial after politicians abolished a centuries-old blasphemy law.

The 42-year-old, who has not been named, was seen setting a large leather-bound copy of the holy book alight in a four-minute clip called “Consider your neighbour: it stinks when it burns".

He faced up to four months in prison after prosecutors were alerted to the footage, which was posted to a Facebook group called “Yes to freedom – no to Islam” in December 2015.

They brought blasphemy charges under clause 140 of Denmark's penal code, which bars people from publicly insulting or degrading religious doctrines or worship.

But the case has been dropped after Danish MPs revoked the 334-year-old legislation, and declared they "do not believe that there should be special rules protecting religions against expressions".

MP Bruno Jerup, who opposed the law, told the Jyllands-Posten newspaper: "Religion should not dictate what is allowed and what is forbidden to say publicly.

"It gives religion a totally unfair priority in society."

Threatening or degrading behaviour based on people's religious beliefs will still be punishable under other Danish laws.

Stephen Fry under police investigation for blasphemy after branding God an 'utter maniac'

Only four blasphemy prosecutions have ever been attempted in Denmark in modern times.

The last was in 1971, when two Denmark Radio producers were acquitted after airing a song mocking Christianity.

Two people were previously fined in 1946 after acting out a “baptism” at a ball in Copenhagen, while four others were prosecuted for putting up anti-Semitic posters and leaflets in 1938.

At least a dozen other cases have been considered but not charged, including in 2006 when prosecutors decided to stop an investigation into the Jyllands-Posten newspaper over a controversial set of caricatures of the Prophet Muhammad.

The publication sparked protests around the world, with insulting the Prophet seen as a grave offence to Muslims and Islamic scholars interpreting Quran verses on idolatry to forbid any representation of Muhammad.

Copies of the Quran are treated with reverence by Muslims and any move to desecrate or destroy the holy book is seen as a grave insult.

Rumours of Quran burnings have sparked arrests, lynchings and riots in Muslim-majority countries, while the move has been appropriated by the far-right and anti-Islamic groups, including the Westboro Baptist Church in America.