Laws prohibiting blasphemy or harming religious feelings exist in many countries, although in some places they are rarely used even if they still exist on the statute book.
Blasphemy is defined as speaking insultingly about a particular religion or god.
Some countries also penalise apostasy, which means abandoning or denying a particular faith.
The US Commission on International Religious Freedom report for 2017 lists 71 countries that have blasphemy laws, in some cases punishable by death.
The US Library of Congress said in 2017 there were 77 countries which have laws "criminalising blasphemy, defaming religion, harming religious feelings, and similar conduct".
Its report states that blasphemy laws are more likely to be actively enforced in the Islamic world.
However, such laws exist across continents and have also been used in Europe.
Blasphemy in Islamic world
The most recent high-profile example in the Muslim world is the case of Pakistani Christian Asia Bibi, whose conviction has been overturned after eight years in prison.
In Pakistan, the blasphemy law has been controversial as it has been used against Christian and other minorities in the Muslim-majority country.
Rights organisation Amnesty International says the law is used to pursue vendettas and justify vigilante violence.
"On the basis of little or no evidence, the accused will struggle to establish their innocence while angry and violent mobs seek to intimidate the police, witnesses, prosecutors, lawyers and judges," it states.
In Pakistan, most victims of the blasphemy laws have actually been Muslim or from the Ahmadi sect (declared non-Muslim by Pakistan), not Christian or other minorities, according to one Pakistani rights groups which looked back at cases over the last 30 years.
The penalties for blasphemy in such countries can be severe.
Apart from Pakistan, Iran, Saudi Arabia and Mauritania have also handed down death sentences in recent years.
However, it's not always clear how many death sentences have been imposed.
"Accusations are often heard in Sharia courts, where reportage is bad or the process of any kind of statistical analysis is lacking," says Bob Churchill of the International Humanist and Ethical Union (IHEU), an alliance of humanist groups that campaigns against blasphemy laws.
Some high-profile cases that have attracted international attention have ended with the death sentence being commuted.
In 2016, a poet in Saudi Arabia was sentenced to death after being accused of insulting Islam, but this was later commuted to lashes and imprisonment.
According to the IHEU, a key concern is that the authorities in some countries do little to intervene and allow mob justice to take its course, or blame the victim if they are targeted by extremists.
"Officials in Bangladesh, including the prime minister, responded to the murder of atheist bloggers by saying that they shouldn't express things that radical Islamists don't want to hear," says Mr Churchill.
Free speech and hate crime
In Europe, there have also been blasphemy cases in a number of countries.
The use of such laws has sometimes become tied up with attempts by the authorities to curtail hate crime - particularly as directed against religious minorities.
- Denmark - a man was charged with blasphemy in 2017 for posting a video of himself burning the Koran on social media
- Finland - a man was fined in 2009 under blasphemy laws for comments about paedophilia and Islam in a blog post
- Germany - a man was prosecuted in 2006 under laws about insulting religious communities for distributing rolls of toilet paper with the words "Koran, the Holy Koran" on them
- Germany - a man was fined 500 euros in 2016 for displaying anti-Christian stickers on his vehicle
- Ireland - British comedian Stephen Fry was investigated after a complaint about comments he made on a TV show there, although the case was dropped last year.
Ireland has now voted in a referendum to decriminalise blasphemy, which was enshrined in the constitution.
Iceland, Norway and Malta have also abolished blasphemy laws in recent years.
In the US, there are no federal blasphemy laws, although some states still have them.
They would, however, almost certainly come into conflict with the free speech and religion clauses of the US constitution if they were to be applied.