Countries Where Atheism Is Illegal or Punishable by Death

Atheism is illegal in more than a dozen countries, and in some of them openly rejecting Islam can carry the death penalty. The laws take two main forms: apostasy statutes that punish leaving the official faith, and blasphemy statutes that punish speech deemed insulting to religion. Formal executions specifically for nonbelief are rare, but the legal threat shapes daily life, and civil consequences like losing custody of your children, your marriage, or your national ID can hit even when no criminal charge is ever filed.

Where Atheism Can Carry the Death Penalty

The following countries maintain laws under which renouncing Islam or embracing atheism can, at least on paper, result in execution.

  • Afghanistan. Under Taliban rule there is no formal penal code covering apostasy. The Taliban applies its interpretation of sharia, under which a man who leaves Islam faces beheading and a woman faces life imprisonment unless she repents. Atheists and converts must appear outwardly Muslim to avoid violence from authorities and from their own families.1European Union Agency for Asylum. Country Guidance Afghanistan 2024 – Individuals Considered to Have Committed Blasphemy and/or Apostasy
  • Iran. The penal code does not explicitly mention apostasy, but courts apply sharia principles and impose the death penalty for leaving Islam. Charges are sometimes folded into offenses such as “enmity against God.”
  • Mauritania. Article 306 of the Penal Code sentences any Muslim found guilty of apostasy or blasphemy to death upon arrest, with no reduction available for repentance.2Office of the High Commissioner for Human Rights. Death Penalty – UN Experts Urge Mauritania to Repeal Anti-Blasphemy Law
  • Pakistan. Section 295-C of the Penal Code prescribes death or life imprisonment for remarks deemed derogatory to the Prophet Muhammad. Though framed as blasphemy, it is routinely used against people accused of rejecting Islam or expressing atheistic views.
  • Qatar. Apostasy is a hudud offense under Law 11 of 2004, which brings sharia into the criminal code. The statutory penalty is death, though Qatar has apparently never imposed the sentence since independence in 1971.
  • Saudi Arabia. Interior Ministry regulations issued in 2014 designate “calling for atheist thought in any form, or calling into question the fundamentals of the Islamic religion” as a terrorist offense, on top of apostasy’s status as a capital crime.3United States Department of State. 2021 Report on International Religious Freedom – Saudi Arabia
  • Somalia. The penal code does not mention apostasy directly, but a de facto death penalty operates through sharia. Blasphemy and defamation of Islam carry two to four years in prison under the penal code, and conversion from Islam is socially and legally prohibited.4European Union Agency for Asylum. Individuals Contravening Religious and Customary Tenets Elsewhere in Somalia
  • Yemen. Article 259 of the penal code defines apostasy as words or deeds inconsistent with Islam committed intentionally or with insistence. The penalty is death, and the accused is given three chances to repent before the sentence is carried out.
  • United Arab Emirates. Conversion from Islam is forbidden and the legal penalty for apostasy is death. No prosecution or legal punishment for apostasy has been publicly documented.

Countries Where the Picture Is More Complicated

A few countries show up on lists of places where atheism can get you killed, but the reality is layered.

  • Malaysia. Apostasy is handled at the state level. Most states that address it impose fines or prison. Two states, Kelantan and Terengganu, list death as a maximum penalty, but that sentence has never been carried out.
  • Nigeria. The federal constitution protects freedom of religion. Twelve northern states apply sharia to Muslims, and their penal codes leave out apostasy provisions in deference to the constitution. Blasphemy accusations in the north can still bring imprisonment and mob violence.
  • Maldives. The constitution states that a non-Muslim may not become a citizen. No specific death penalty for apostasy has been documented, but renouncing Islam effectively strips citizenship.5Constitute Project. Maldives 2008 Constitution
  • Sudan. Article 126 of the criminal code, which had prescribed the death penalty for apostasy, was repealed in July 2020. The new penal code has not been fully implemented, and uncertainty remains about whether apostasy is fully decriminalized.

Countries That Jail Atheists Without Killing Them

A larger group of countries criminalizes blasphemy, religious insult, or deviation from recognized faiths with prison terms and fines. These provisions are often used against atheists who speak out, especially online.

Egypt is among the more active enforcers. Article 98(f) of the Egyptian Penal Code prescribes six months to five years in prison for using religion to promote “extremist ideas,” insult a monotheistic religion, or damage national unity. Egyptian courts have sentenced multiple people under this provision for atheistic posts on social media, with terms ranging from six months to six years.

Indonesia expanded its blasphemy law through a new penal code that took effect in recent years, keeping prison sentences of up to five years for deviations from the core teachings of the country’s six officially recognized religions. In one well-known case, a man from West Sumatra was sentenced to two and a half years for posting atheistic content online.

Iraq criminalizes blasphemy under its penal code, though the law is rarely enforced through formal channels. Apostasy falls under sharia jurisdiction, and converts or atheists usually face far greater danger from clan members, tribal groups, and extremist organizations than from the courts.6European Union Agency for Asylum. Country Guidance Iraq 2024 – Individuals Considered to Have Committed Blasphemy and/or Apostasy, Including Converts and Atheists

When the Legal System Makes Atheism Impossible to Live

Some countries don’t need to prosecute atheists because the paperwork does the work. Egypt requires every citizen over 16 to carry a national ID card listing one of three recognized religions: Islam, Christianity, or Judaism. There is no option for “none.” Without the card, a person cannot open a bank account, get a driver’s license, enroll in a university, or collect a pension. An atheist must either claim a religion they don’t hold or lose access to basic civic life.

The Maldives goes further. Because the constitution bars non-Muslims from citizenship, declaring yourself an atheist raises the question of whether you can remain a citizen at all.5Constitute Project. Maldives 2008 Constitution

What Happens to Your Family and Your Property

In countries that apply sharia to personal status matters, leaving Islam can trigger civil consequences that reach into marriage, custody, and inheritance even without a criminal charge.

Your Marriage

In classical Islamic jurisprudence, apostasy by one spouse can dissolve the marriage. Under one school of thought, the contract becomes void the moment a spouse leaves Islam, without a court ruling. Another school holds that the marriage survives through a waiting period during which the apostate can return to Islam; if they don’t, the marriage ends. Either way, a former Muslim who becomes an atheist may find their marriage erased as a legal matter.

Your Children

Religious courts in sharia-based systems routinely deny custody to a parent found to be an apostate, on the theory that a non-Muslim parent cannot raise Muslim children. A parent who quietly stops believing may keep their family intact; a parent who says so risks losing their children through a legal process that treats their nonbelief as disqualifying.

Your Inheritance

Islamic inheritance law generally prohibits a non-Muslim from inheriting from a Muslim relative. A person identified as an apostate can be cut off from family wealth, including property they might have expected to inherit from parents or a spouse. A Muslim can leave a bequest to a non-Muslim heir through a will, but the mandatory shares that would otherwise pass automatically under sharia do not cross religious lines.

What International Law Says

International law is unambiguous. Article 18 of the Universal Declaration of Human Rights guarantees everyone the right to freedom of thought, conscience, and religion, including freedom to change one’s religion or belief.7United Nations. Universal Declaration of Human Rights Article 18 of the International Covenant on Civil and Political Rights adds that no one may be subjected to coercion that would impair their freedom to have or adopt a religion or belief of their choice.8United Nations. International Covenant on Civil and Political Rights

The UN Human Rights Committee has stated that Article 18 “protects theistic, non-theistic and atheistic beliefs, as well as the right not to profess any religion or belief.”9University of Minnesota Human Rights Library. General Comment 22 These standards bind countries that have ratified the ICCPR, which includes many of the nations listed above. The gap between what those governments have agreed to and what they enforce at home is enormous, but the framework gives atheists and human rights groups a recognized basis for challenging criminalization.

Asylum if You’re Facing Persecution

The 1951 Refugee Convention protects people fleeing persecution based on religion, and UNHCR guidance states that “belief” includes “theistic, non-theistic and atheistic beliefs,” and that failing or refusing to observe a religion qualifies for protection.10UNHCR. Handbook and Guidelines on Procedures and Criteria for Determining Refugee Status

In the United States, asylum is available to anyone who shows a well-founded fear of persecution on account of race, religion, nationality, membership in a particular social group, or political opinion. Atheism fits within the “religion” ground because freedom of religion includes freedom from religion. You must show that the harm you face is serious enough to count as persecution and that the persecutor is either a government agent or a private actor the government is unable or unwilling to control. Proof of past persecution creates a rebuttable presumption of future persecution.11USCIS. Persecution LP RAIO

Winning on this ground is harder than the framework suggests. Atheism is an internal conviction, so applicants often need a pattern of behavior consistent with it: social media posts, testimony from people who know them, or evidence of past run-ins with authorities. In countries where expressing atheism can get you killed, the evidence you need is the evidence you’ve spent years hiding. Attorney fees for U.S. asylum cases typically run several thousand dollars, and the process can take years; nonprofits focused on religious freedom and refugee assistance sometimes provide reduced-cost or pro bono representation.