Modern laws in Muslim-majority countries {{Anchor|Homosexuality_laws_in_majority-Muslim_countries}}
Criminalization According to the
International Lesbian and Gay Association (ILGA) seven countries retain capital punishment for homosexual behavior:
Saudi Arabia,
Yemen,
Iran,
Afghanistan,
Mauritania, northern
Nigeria, southern
Somalia, and the
United Arab Emirates.
Afghanistan also has the death penalty for homosexuality since the
2021 Taliban takeover. While
Egypt does not have a de jure law explicitly criminalizing homosexual behavior, gay men (or people suspected of being gay) have been prosecuted under general public morality laws. (See
Cairo 52.) "Sexual relations between consenting adult persons of the same sex in private are not prohibited as such. However, the Law on the Combating of Prostitution, and the law against debauchery have been used to imprison gay men in recent years." The Sunni
Islamist militant group and
Salafi-jihadist terrorist organization ISIL/ISIS/IS/Daesh, which
invaded and claimed parts of
Iraq and
Syria between 2014 and 2017,
enacted the political and religious persecution of LGBT people and decreed capital punishment for them. ISIL/ISIS/IS/Daesh terrorists have executed more than two dozen men and women for suspected homosexual activity, including several thrown off the top of buildings in highly publicized executions. to abrogate and liberalize laws from the
colonial era that banned homosexuality. As of September 2018, homosexuality is no longer a criminal act in India, and most of the religious groups withdrew their opposing claims against it in the Supreme Court. In
Iraq, homosexuality is allowed by the government, but terrorist groups often carry out illegal executions of gay people.
Saddam Hussein was "unbothered by sexual mores". Ali Hili reports that "since the 2003 invasion more than 700 people have been killed because of their sexuality." He calls Iraq the "most dangerous place in the world for sexual minorities." In
Jordan, where homosexuality is legal, "gay hangouts have been raided or closed on bogus charges, such as serving alcohol illegally." In
Pakistan,
its law is a mixture of both British colonial law as well as Islamic law, both which prescribe criminal penalties for same-sex sexual acts. The
Pakistan Penal Code of 1860, originally developed
under colonial rule, punishes sodomy with a possible prison sentence. Yet, the more likely situation for gay and bisexual men is sporadic police fines, and jail sentences. In
Saudi Arabia, the maximum punishment for homosexual acts is public execution by beheading. In
Malaysia, homosexual acts are illegal and punishable with jail, fine, deportation, whipping or chemical castration. In October 2018,
Prime Minister Mahathir Mohamad stated that Malaysia would not "copy" Western nations' approach towards LGBTQ rights, indicating that these countries were exhibiting a disregard for the institutions of the traditional family and marriage, as the value system in Malaysia is good. In May 2019, in response to the warning of
George Clooney about intending to impose death penalty for homosexuals like Brunei, the Deputy Foreign Minister
Marzuki Yahya pointed out that Malaysia does not kill gay people, and will not resort to killing sexual minorities. He also said, although such lifestyles deviate from Islam, the government would not impose such a punishment on the group.
Indonesia does not have a
sodomy law and does not currently criminalize private, non-commercial homosexual acts among consenting adults, except in
Aceh province where homosexuality is illegal for Muslims under Islamic Sharia law, and punishable by flogging. While it does not criminalise homosexuality, the country does not recognise
same-sex marriage. In July 2015, the
Minister of Religious Affairs stated that it is difficult in Indonesia to legalize Gay Marriage, because strongly held religious norms speak strongly against it.
People's Representative Council (DPR) has dismissed the suggestion that the death penalty would be introduced for same-sex acts, citing that it is quite impossible to implement that policy by the government of Indonesia. As the latest addition in the list of criminalizing Muslim countries,
Brunei's has implemented penalty for homosexuals within
Sharia Penal Code in stages since 2014. It prescribes death by stoning as punishment for sex between men, and sex between women is punishable by
caning or imprisonment. The sultanate currently has a moratorium in effect on death penalty. As of 2025, homosexuality is criminalized in 34
Muslim-majority countries, they are
Afghanistan,
Algeria,
Bangladesh,
Brunei,
Burkina Faso,
Chad,
Comoros,
Egypt,
Gambia,
Guinea,
Iran,
Iraq,
Kuwait,
Lebanon (de facto),
Libya,
Malaysia,
Mali,
Mauritania,
Morocco,
Nigeria,
Oman,
Pakistan,
Qatar,
Saudi Arabia,
Senegal,
Sierra Leone,
Somalia,
Sudan,
Syria,
Tunisia,
Turkmenistan,
United Arab Emirates,
Uzbekistan, and
Yemen. In
Indonesia, homosexuality isn't criminalized, although there are severe prosecutions of homosexuals, especially in
Aceh and
South Sumatra. There is also an upcoming law in Indonesia that criminalizes sex outside of marriage that will be in effect in December 2025, and same-sex marriage is banned, which will
de facto criminalize homosexuality. In
Gaza, the legality of male homosexuality is unclear. In
Western Sahara, a disputed territory claimed by Morocco, homosexuality is criminalized. In recent years, the number of Muslim-majority countries that criminalize homosexuality has been increasing, with the most recent ones being Chad in 2017, Iraq and Mali in 2024, and Burkina Faso in 2025.
Death penalty All nations currently having capital punishment as a potential penalty for homosexual activity are
Muslim-majority countries and base those laws on interpretations of Islamic teachings, with the exception of
Uganda. In 2020, the
International Lesbian, Gay, Bisexual, Trans and Intersex Association (ILGA) released its most recent
State Sponsored Homophobia Report. The report found that eleven countries or regions impose the death penalty for "same-sex sexual acts" with reference to sharia-based laws. In Iran, according to article 129 and 131 there are up to 100 lashes of whip first three times and fourth time death penalty for lesbians. The death penalty is implemented nationwide in
Brunei,
Iran,
Saudi Arabia,
Afghanistan,
Yemen, northern
Nigeria,
Mauritania,
the United Arab Emirates, and southern
Somalia. This punishment is also allowed by the law but not implemented in
Qatar and
Pakistan; and was back then implemented through non-state courts by
ISIS in parts of
Iraq and
Syria (now no longer existing). In the
Chechen Republic, a part of the
Russian Federation,
Ramzan Kadyrov has
actively discriminated against homosexual individuals and presided over a campaign of arbitrary detention and extrajudicial killing. It has been suggested that "to counteract popular support for an Islamist insurgency that erupted after the Soviet breakup, President
Vladimir V. Putin of Russia has granted wide latitude to Kadyrov to co-opt elements of the Islamist agenda, including an intolerance of gays." Reports of the discrimination in Chechnya have in turn been used to stoke Islamophobic, racist, and anti-Russia rhetoric.
Jessica Stern, executive director of
OutRight Action International, has criticized this bigotry, noting: "Using a violent attack on men accused of being gay to legitimize Islamophobia is dangerous and misleading. It negates the experiences of queer Muslims and essentializes all Muslims as homophobic. We cannot permit this tragedy to be co-opted by ethno-nationalists to perpetuate anti-Muslim or anti-Russian sentiment. The people and their government are never the same."
Minor penalty In
Algeria,
Bangladesh,
Chad,
Morocco,
Aceh,
Maldives,
Oman,
Pakistan,
Qatar,
Syria, and
Tunisia, it is illegal, and penalties may be imposed. In
Kuwait,
Sierra Leone,
Turkmenistan,
Uzbekistan,
homosexual acts between males are illegal, but homosexual relations between females are legal.
Legalization in 2013,
Taksim Square,
Istanbul, Turkey. ,
Albania. Same-sex sexual intercourse is legal in
Albania,
Azerbaijan,
Bahrain,
Bosnia and Herzegovina,
Côte d'Ivoire,
Djibouti,
Guinea-Bissau,
Jordan,
Kazakhstan,
Kosovo,
Kyrgyzstan,
Niger,
Tajikistan,
Turkey, the
West Bank (
State of Palestine),
Indonesia (
de jure; except
Aceh), and in
Northern Cyprus. In Albania and Turkey, there have been discussions about legalizing same-sex marriage. In
Lebanon, courts have ruled that the country's penal code must not be used to target homosexuals, but the law has yet to be changed by parliament.
Discrimination protections Under the UN administration,
Kosovo became the first Muslim-majority country to enact anti-discriminatory protections based on sexual identity. In 2009, similar protections were introduced in
Bosnia and Herzegovina. The next year, a law adopted by
Albania prohibited discrimination for
sexual orientation and
gender identity. Since early 2000s, thanks to the
EU accession bid, LGBTQ+ rights reforms were brought into consideration in
Turkey. In 2013, in the course of the legislative efforts for a
constitutional amendment, the main opposition
CHP proposed a draft to provide employment protections, which was subsequently approved by all major parties in the
Turkish Parliament, including the ruling
AKP. It, however, was never enacted following conflict in other clauses, and the subsequent
democratic backsliding of Turkey shut the door to further improvements. Even though legal protections are absent, the local governments held by the
Kemalist opposition are signatories to a variety of international agreements, and they pledge to indiscriminate in employment. Some municipalities even have dedicated bodies to ensure equity for LGBTQ+ individuals. In 2014, the
Turkish Republic of Northern Cyprus, albeit a
non-recognized entity, made history by introducing employment protections based on sexual identity, in addition to gender, on the Penal Law.
Same-sex marriage In 2007, there was a gay party in the
Moroccan town of
al-Qasr al-Kabir. Rumours spread that this was a gay marriage and more than 600 people took to the streets, condemning the alleged event and protesting against leniency towards homosexuals. Several persons who attended the party were detained and eventually six Moroccan men were sentenced to between four and ten months in prison for "homosexuality". In
France, there was an Islamic same-sex marriage on 18 February 2012. In November 2012 in Paris, a room in a Buddhist prayer hall was used by gay Muslims and called a "gay-friendly mosque". He further expressed support for gay marriage stating: "I believe that the right to marry someone who you please is so fundamental it should not be subject to popular approval any more than we should vote on whether blacks should be allowed to sit in the front of the bus." In 2014, eight men were jailed for three years by a Cairo court after the circulation of a video of them allegedly taking part in a private wedding ceremony between two men on a boat on the Nile.
Transgender rights '' and transgender people protest in
Islamabad,
Pakistan. In the late 1980s, Mufti
Muhammad Sayyid Tantawy of
Egypt issued a
fatwa supporting the right for those who fit the description of
mukhannathun and
mukhannathin to have
sex reassignment surgery;
Ayatollah Khomeini of
Iran issued similar
fatwas around the same time. While Iran has outlawed homosexuality, Iranian thinkers such as Ayatollah Khomeini have allowed for transgender people to change their sex so that they can enter heterosexual relationships. The government even provides up to half the cost for those needing financial assistance and a sex change is recognized on the birth certificate. The secular yet Muslim majority country,
Turkey, generally accepts gender adjustment surgery. Nonetheless, there is no financial support for transgender people and many transgender people are faced with prejudice. On 26 June 2016, clerics affiliated to the
Pakistan-based organization Tanzeem Ittehad-i-Ummat issued a
fatwa on transgender people where a trans woman (born male) with
"visible signs of being a woman" is allowed to marry a man, and a trans man (born female) with "visible signs of being a man" is allowed to marry a woman. Pakistani transgender persons can also change their (legal) sex. Muslim ritual funerals also apply. Depriving transgender people of their inheritance, humiliating, insulting or teasing them were declared
haraam. In May 2018, the Pakistani parliament passed a bill giving transgender individuals the right to choose their legal sex and correct their official documents, such as ID cards, driver licenses, and passports. Today, transgender people in Pakistan have the right to vote and to search for a job free from discrimination. As of 2018, one transgender woman became a news anchor, and two others were appointed as Supreme Court clerks. ==Public opinion among Muslims==