LGBT history in Turkey covers the development, contributions and struggles of lesbian, gay, bisexual and transgender (LGBT) people in the history of Turkey and their relation between Turkish politics from the abolition of the Caliphate to modern-day Turkey.
 The Ottomans, before the 19th-century, did not base sexual identities on attraction to a specific gender but distinguished between active and passive partners, often distinguished as "the lover" and "the beloved". Therefore, choice of a partner was merely based on taste and not on sexual identity. This made certain types of same-sex attraction permissible, but this attraction was most often legitimized in a pederastic context.
 
By the late 19th century, homosexual contact started to decline and the focus of desire turned to young girls. Ahmet Cevdet Pasha stated: Woman-lovers have increased in number, while boy-beloveds have decreased. It is as if the People of Lot have been swallowed by the earth. The love and affinity that were, in Istanbul, notoriously and customarily directed towards young men have now been redirected towards girls, in accordance with the state of nature. Research shows that the decline is in close relationship to the criminalization of homosexuality in the Western world, which followed repression of the queer community.
 After the collapse of the Ottoman Empire in 1923 and the foundation of the Turkish Republic, Turkey's first president Mustafa Kemal Atatürk introduced a number of reforms that impacted the view on gay relationships within the country. Atatürk's goal to modernize institutions and cultural traditions was heavily influenced by conservative Western ideals. The Christian-ruling countries did not allow for non-heterosexual relationships and pressed their ideals on the rest of the world. Under the influence of European modernization, Turkey adapted more and more to European clothing styles and made the wearing of hats mandatory. Refusal to wear these in public had legal consequences. Further behaviour such as open affection for the people of the same sex as well as "feminine" behaviour became stigmatized. This process of "Europeanization" led to a rapid increase of discrimination against the queer community. It is unclear how much Atatürk himself accepted homosexuality.
 After Atatürk, the Turkish government persisted in the process of Europeanization of the country, and until the 1960s homosexuality was not publicly discussed. The queer community had the liberty to participate in all sorts of entertainment and activities. The situation changed with the election of the Republican People's Party (CHP) in 1974, in coalition with the National Salvation Party (MSP). The MSP controlled the Interior Ministry, making queers the target of repressive policies. The attacks against the community became more frequent and violent. The members of the LGBT+ community kept on fighting for their rights and, to protect themselves, attempted to create their own political identity. Multiple cities became centers of queer resistance such as Istanbul, Izmir and Ankara. With the military coup d'état on September 12, 1980, their effort came to an end.
 With the establishment of the military regime, political parties were banned and the freedom of demonstration, association, speech, and the press were censored. The authorities initiated a campaign of mass persecution against the members of the community and trans sex workers were "deported" from the city centers to the outskirts of the city, and arrested from their places of work or in their apartments. The arrested were imprisoned with the political prisoners and had to face phycological and physical torture. In the 1980s, the Radical Democratic Green Party openly declared to be against police brutality and expressed their support in favor of gay rights and the transgender community assaulted by the authorities.
 The first legal ban occurred on March 19, 1981, when the Interior Ministry prohibited Drag queens from performing on nightclub stages. Bülent Ersoy attempted to circumvent the ban by undergoing sex reassignment surgery in London. The goal was to be legally recognized as a woman and not as a transvestite, however the Turkish government refused to recognize the transition and kept treating her as a "man in drag". On June 13, 1981, the Istanbul governor stopped Ersoy from performing, because she was wearing a woman's outfit and, according to the law, she was a man. Ersoy's ban was lifted on January 7, 1988, under Turgut Özal's government. In the same year, the Article 29 of the Turkish Civil Code was modified, allowing transgender persons to change their gender in the civil status register after gender confirmation surgery.
 Ersoy was not the only one fighting for her rights. As a response to the situation they were living in, the entire trans community started organizing protests in Istanbul, Izmir and Ankara with the support of feminist and human rights organizations and influenced by the Stonewall riots. In Ankara was founded the first queer organization, however it failed, while in Izmir, Ibrahim Eren opted to organize individual and group discussion in his house.
 In 1987, the members of the LGBTQ+ community attempted to form a political party, the Radical Democratic Green Party, which brought homosexuality under the spotlight. This led to public discussions and engagement with it, and the other political parties were forced to clarify their positions in relation to homosexuality. Out of all the parties, only the Social Democratic Populist Party did not explicitly express themselves, however they weren't supportive of a law specifically written to protect the LGBTQ+ community.
 Because of the increasing violent actions from the police, on April 29, 1987, trans persons, lesbians, and gay men initiated a ten-day hunger strike in Gezi Park by Taksim Square. The strike started in a house in Taksim and was moved to Gezi Park the next day until it was dispersed by the police. However, the protest continued in different houses for weeks, and managed to get support from the Radical Democratic Green Party and some famous artists and intellectuals. This hunger strike is considered to be the first large-scale LGBTQ+ protest before the 1990s, and a tuning point in the contemporary queer movement.
 Some openly gay people were able to be successful in the 1980s. Murathan Mungan has been openly gay throughout his professional life as a successful poet and writer. However, many gay and bisexual men who lived during this period have since said in interviews that they felt pressured, by social attitudes and government policy, to remain in the closet about their sexual identity.
 The 1990s were characterized by efforts on specific topics that would condition the political agenda of the queer movement. With the support of European queer organizations, queer activists were able to found and organize the first lasting associations. In 1993, supported by the collaboration with the German initiative Schwule International, the Turkish queer activist organized their first Pride. The governor of Istanbul banned the event, but in doing so the discrimination that the LGBTQ+ community faces in Turkey was brought in their annual progress report written by the Commission for Human Rights of the European Parliament. Following the ban, queer activist founded LambdaIstanbul, and in 1994 it became part of the International Lesbian and Gay Association. At the same time, in Ankara KaosGL was founded and, together with LambdaIstanbul, they got support from Turkish non-governmental organizations.
 During the second half of the 1990s, the members of the LGBTQ+ community started differentiating among themselves, to feel adequately represented within the community. New separated associations were founded, such as LEGATO. However, they kept organizing joint actions, and from 1998 until 2004, they organized celebrations twice a year both in Istanbul and Ankara.
 In 1996, since the Second United Nations Conference on Human Settlements was taking place in Istanbul, the authorities carried out "cleansing operations" in central parts of Istanbul to free the streets from trans and other sex workers, street vendors, homeless people and drug users. The aim was to present Istanbul as a city inhabited by middle-class Turkish citizens. Despite the numerous protests, the police violence did not stop, but they managed to draw attention to the affected communities.
 The following year, in 1997, Lambda became the first Turkish LGBTQ+ NGO to be invited by the government to a government conference, namely the National Congress on AIDS. The same year, Hamam, a Turkish film featuring a gay romance, was released internationally and broadcast on state television.
 In 1999, the Left Party banned discrimination based on sexual orientation and gender identity within their party. Demet Demir became the first transgender candidate to run for political office in Turkish history.
 Following Turkey's recognition as a candidate for joining the European Union, Ankara passed a series of "harmonization packages" to meet international expectations of improving the conditions for minorities and for civil society in general. The changes proposed had an immediate and positive effect on the queer movement: it grew considerably, gained more visibility, and it established solidarity with other social movements.
 In 2002, the parliamentary elections saw the Justice and Development Party (AKP) taking power for the first time. They declared their desire to guarantee the rights to all the population, including the members of the LGBTQ+ community. The same year, the Turkish Civil Code changed its regulations regarding the sex change: to transition, the court's permission was needed. In order to do so, the applicant had to provide a report from a hospital stating the "transsexual nature", pathologizing transsexuality. Moreover, the sex reassignment surgery could only happen after the mandatory sterilization of the applicant.
 The following year, in 2003, Istanbul hosted the first pride and, in 2004, the Turkish Parliament approved the Law on Associations. Contrarily to the previous Associations Law, from 1983, all associations were able to be created with less bureaucracy and were less controlled by the government. Between 2005 and 2006, KaosGL and LamdaIstanbul were recognized as official. However, despite the increasing recognition of the LGBTQ+ community, in 2006 AKP took legal action against LambdaIstanbul: according to the governor of Istanbul, the association was violating the Law on Associations and the public morals, making it a threat for the Turkish family structures. Eventually, the judgment was reversed in favor of the association.
 In December 2006, Bigudi Club was established in Istanbul as the first lesbian-exclusive nightclub in the country of Turkey.
 Since 2007, the conflicts between the AKP and queers became more frequent and heated. To respond to the impact of AKP's discriminatory policies, several queer associations created a coalition under the name Platform for LGBTI Rights (LGBTT Hakları Platformu). In 2008, they demanded the addition of "sexual orientation and sexual identity" to the Article 10 of the Turkish Constitution, which stipulates that "everyone is equal before the law".
 In 2008, Ahmet Yildiz was killed by his father in Istanbul. His murder has been referred to as the first gay honor killing in Turkey, and his body remained unclaimed by his family. The same year, Ankara hosted the first pride.
 In 2009, Halil İbrahim Dinçdağ was suspended by the Turkish Football Federation after he was outed as gay. He was also disavowed by friends and family. In 2015, the Federation was ordered to pay compensation to Dinçdağ as a result of his lawsuit.
 The first years of the new decade were characterized by a wave of demonstrations. During the Gezi protests in 2013, the members of the LGBTQ+ community played a major role. They created an LGBTQ+ section that organized protests, discussions and rallies, culminating in a demonstration that brought around 100,000 people to protest against AKP. The same year, Ankara hosted its first pride.
 During the protests new queer organizations were created, allowing them to participate more actively in the political life and to create larger networks with national and international organizations. Queer groups were founded even within some political parties, such as the People's Democratic Party and the Peace and Democracy Party. Moreover, a new polyclinic for queers and sex workers was established in Istanbul.
 Under AKP's rule, state repression became more intense. In 2014 the pride march counted more than 100,000 participants, making it one of the biggest pride marches in Southeastern Europe, and politicians of the main opposition parties, CHP and BDP, lent their support to the demonstration. As a consequence, the following year, Turkish authorities stopped and the annual pride parade in Istanbul through violence, making use of tear gas, rubber bullets and water cannons against the marchers.
 The following years, the authorities continued banning Istanbul Pride and, in 2017, the Ankara Governor's Office banned the German embassy's LGBT Film Festival. A couple of months later, on November 17, they also banned all the films, exhibitions and events related to LGBTQ+, because of "public sensitivities". On November 19, two days later, two LGBTQ+ organizations said they would launch a legal process against the decision.
 In 2018, the Istanbul Pride parade was banned for the fourth year in a row. Despite the ban, the organizers chose to march anyway, but Turkish police clashed with the crowd, using plastic bullets and tear gas to break them apart. The authorities banned in Ankara the screening of the movie Pride, a 2014 comedy-drama with LGBTQ+ themes, claiming it put at risk public safety. The pride march was banned in Andana too, over "possible incitement of hatred and hostility" among people.
 In 2019, the ban of the Pride Parade in Istanbul was renovated. The opposition Member of the Grand National Assembly Sezgin Tanrıkulu of the CHP lodged a parliamentary question to the Vice President of Turkey Fuat Oktay asking for an explanation. He also asked how many members of the LGBTQ+ community were killed in the last 17 years, the amount of time passed since AKP firstly won the elections. On June 29, hundreds of people chose to march despite the ban and were met with tear gas, pepper gas and plastic bullets from the police.
 In the midst of the crisis caused by the COVID-19 pandemic Ali Erbaş, president of the Directorate of Religious Affairs(Diyanet) in Turkey, held a Friday sermon in April 2020 in which he blamed "immoral" sexual behaviour, including homosexuality, for "bringing illness". In this sermon he also implied that there was a connection between the HIV epidemic and the COVID-19 pandemic. Homophobic rhetoric in the political discourse increased noticeably during the months following this sermon. In July of the same year, the major Turkish clothing chain LC Waikiki banned all symbols that could be linked with the LGBTQ+ community. Also in July of the same year Netflix cancelled a series that was due to air in 2021, because the Turkish government objected to the fact that a gay character would feature in it. Nonetheless, despite the increasing homophobia in politics and the decrease in queer public spaces, digital spaces created by LGBT groups flourished under the COVID-19 restrictions on social interaction.
 While the 2020 Istanbul Pride was held online as a result of COVID-19, in 2021 protesters once again assembled to hold a Pride Parade in the centre of Istanbul, but the crowd was dispersed by riot police. The police had also set up barricades beforehand to prevent the march from happening, invoking "a law against protests that violate public "morality"" In 2022 the authorities similarly attempted to prevent protesters from gathering by shutting down public transportation and blockading streets. The protesters who managed to assemble nonetheless were dispersed by riot police, who arrested over 200 people.
 In 1926, Turkey implemented a new reform called the Turkish Civil Code (TCC) that established near complete gender equality between a man and a woman. The TCC did not contain procedures when it came to transgender individuals. The lack of precedent allowed legal authorities to ignore requests from transgender individuals when they requested changes to their legally stated gender. A new amendment to the TCC in 1988 allowed for a documented gender change in the legal registry as long as the transgender individual has already performed gender-affirming surgery.  Restrictions in the new amendment of the TCC were harsh and required many pre-requisutes in order to be able to receive gender-affirming surgery. Transgender individuals had to ask and be granted permission for the surgery, be at least 18 years of age, unmarried, and sterilized in order to receive gender-affirming surgery.
 The case of YY v Turkey in 2015 pushed for the removal of the sterilization requirement to gender-affirming surgery. This case was a key part in the European Court of Human Rights (ECHR)'s landmark case in 2017 that voided the requirement of sterilization in order to qualify for gender-affirming surgery. Turkeys YY v Turkey was used as a precedent.