For a brief moment, Istanbul’s Taksim Square was transformed yesterday. The riot police, clouds of tear gas, and barricade-building protesters that characterized the past month’s unprecedented unrest were gone. Instead, a mass of rainbow flags, garish makeup, and neon clothing and face paint gleamed in the afternoon sunshine ahead of the city’s 10th LGBT pride march.

The atmosphere was festive. Despite that the demonstration was not legally sanctioned and there were frequent anti-government chants, uniformed police were almost nonexistent. Public reaction seemed to be almost overwhelmingly positive, and bystanders applauded the procession as it passed down İstiklâl Avenue. Attendance, estimated at least 20,000, was among the largest in the march’s history and included three M.P.s from the Republican People’s Party, an opposition group.

It was an undeniable success, and organizers were justifiably delighted. But under any other circumstances, things might have been very different. Homosexual conduct between consenting adults is legal in Turkey, but far from accepted. Prejudice is widespread: 84 percent of Turkish people said gays or lesbians were among the groups they would least like living in their area, according to 2011 research conducted as part of the World Values Survey.

Intolerance often manifests itself as discrimination, abuse, and brutal violence. “It’s not just about equality. We have to fight for our right to live,” says Hassan Metehan Ozkan, a founder of the solidarity group LISTAG, which supports families of LGTB individuals in Istanbul.

Hate crimes against LGBT individuals are higher in Turkey than in any other member of the Council of Europe, advocacy groups say. Gay men and transgender women are at particular risk. At least 30 transgender individuals in Turkey were murdered between January 2008 and December 2012, according to Transgender Europe. The figure is higher than in any other European, Middle Eastern, African, or Asian country for which data are available, although considerably less than the 69 murders which occurred in the U.S. over the same period. “Honor killings” as a result of sexual preference, such as the fatal shooting of Ahmet Yildiz, and the “R.Ç.” case, in which a father is currently on trial for the murder of his 17-year-old gay son, have also taken place.

Homophobic attitudes start at the very top. Prime Minister Recep Tayyip Erdogan said homosexuality was “a sexual preference” that is “contrary” to Islam, in remarks reported in local media earlier this year. And Minister for Women and Family Affairs Selma Aliye Kavaf described it as “a biological disorder, a disease,” in a 2010 interview with the Hürriyet daily news.

The national Constitution itself does not offer protection against discrimination on grounds of gender identity or sexual orientation. There is, however, little political will to address this, says Andrew Gardner, a Turkey researcher with Amnesty International: “At the highest level ... there is a complete refusal to recognize that there actually are LGBT rights or to implement nondiscrimination provisions in a way that would protect LGBT individuals.”

The justice system is, in many cases, weighed against victims of hate crimes, Ozkan adds. Culprits apprehended in transgender murder cases, for example, sometimes employ a defense of “unjust provocation” and lenient sentencing as a result.

The authorities are not just failing to protect LGBT individuals, however. In some cases they are actively responsible for maltreatment. Provisions in the criminal code on exhibitionism and public morality are often used by the police to harass LGBT people, according to the European Commission. Transgender individuals—often least able to hide their identity—have been detained and fined on misdemeanor charges and even faced torture and abuse in custody, says Gardner.

State interference in media coverage of gay and transgender topics means that positive representation is a rarity. “The only reason LGBT individuals are shown in the press is if they are killed,” says İlker Çakmak, spokesperson and head of communications with Istanbul LGBTT Solidarity Association, pointing to often-lurid and sensational reports of transgender murders.

RTÜK, the state agency responsible for monitoring and regulating radio and television content, is heavily involved in censoring content. The cable broadcast of Sex and the City 2, for example, was blocked due to its “twisted and immoral” depiction of a gay wedding. In 2011 the Telecommunications Communication Presidency (TIB) prohibited Turkish Internet-hosting providers from using the word “gay,” along with 137 other potentially inflammatory words, in domain names and websites, according to Freedom House. TIB has also shut down LGBT Internet forums.

As bad as things are in Turkey—especially in regard to the high numbers of transgender murders—conditions in some of its regional neighbors are far worse. “It’s certainly one of the best countries [for LGBT rights] in the Middle East and Africa,” says Isays Hossein Alizadeh, Middle East and North Africa program coordinator with the International Gay and Lesbian Human Rights Commission. “But then standards are really not very high.” In four Middle Eastern countries—Iran, Saudi Arabia, United Arab Emirates, and Yemen—same-sex consensual sexual activity between consenting adults is still punishable by death, according to the International Lesbian and Gay Association.

Meanwhile, in Iraq—which does not prohibit homosexuality in its penal code—militia squads have targeted LGBT individuals alongside any other displays of supposedly “effeminate” behavior, as in the spate of so-called “emo” killings that swept the country in 2012. Homosexuality remains illegal in Kuwait, Syria, and parts of the Palestinian territories, and while not actually unlawful in Jordan, societal and legal discrimination is common. The same is true of Lebanon, where LGBT people have been tortured in police custody, according to Human Rights Watch.

Things in Turkey, are, however, slowly getting better, Alizadeh adds. Progress was also lent a huge boost by the momentous protests of recent weeks.

During the Gezi Park occupation, minority groups were able to raise their flags in safety, boosting awareness and support for their causes. Those with a well-established history of activism, such as Kurdish, feminist, and LGBT associations, were better organized and experienced with advocacy than their newly established counterparts and played a central role in the movement as a result.

More than that, though, many of Istanbul’s inhabitants are now experiencing a taste of the treatment faced by minority groups for years. Banging pots and pans together—a common tool of protesters—is punished using the same laws once employed to harass transgender women, and the censorship tactics employed to suppress discussion of homosexual issues and information on human-rights abuses in Kurdish areas were used to silence reporting on the protests.

It is too early to tell whether or not its role in the broader protest movement will make a lasting difference to the LGBT community in Turkey, but there are signs that for some, attitudes have already started to change. The quantity and nature of inquiries to Istanbul LGBTT Solidarity Association, for example, has changed markedly since the Gezi demonstrations began, Çakmak says. “A month ago, the only people who phoned us or sent emails via the website were asking for condoms or hormone shots. Now individuals aged from 17 to 70 are getting in touch to apologize for using homophobic slurs in the past and promising to never do so or allow others to do so again.”