Paragraph 4 of article 226 of the Penal Code foresees a one- to four-year prison sentence as well as a monetary fine for the dissemination of images, text or voice recordings relating to zoophilia (bestiality), necrophilia or what the article terms “sexual acts conducted in unnatural ways.”

Meanwhile, this year’s Gay Pride Parade in Istanbul and Turkey’s first transsexual beauty pageant, which preceded it, received widespread media coverage that focused more attention on LGBT rights and the plight of this community in this country.

Yet, Turkey is also full of contradictions which demonstrate that while the LGBT community faces an uphill battle for rights, the battle is not a totally hopeless one. In a recent development, a judge in the western Anatolian city of Aydin applied to the Constitutional Court against an article in the Penal Code that is frequently used against transgender persons.

At the same time, violence and institutionalized discrimination based on religious morality and homophobic prejudice is often just a step away for members of the transgender community.

Being a predominantly Muslim and conservative country, Turkey clearly is no haven for lesbians, gays, bisexuals or transsexuals. As Al-Monitor’s Verda Ozer has pointed out, the Islamist government of Prime Minister Recep Tayyip Erdogan has done its best to block attempts at enhancing LGBT rights.

While there is no legal ban on homosexuality in Turkey, this vague reference has been used frequently in the past by prosecutors and judges against transgender persons, thus establishing a string of legal precedents.

According to a report in daily Milliyet, the Aydin judge’s decision relates to an “obscenity” case based on the sale of gay pornography. The judge filed an application with the Constitutional Court after accepting the defense’s argument that using Article 226 against transgender persons was unconstitutional.

After studying the application, the Constitutional Court decided it was admissible. The Constitutional Court has in recent months provided a series of rulings, based on reforms enacted over the past few years within the context of Turkey’s application for membership in the European Union, which upholds rights and freedoms.

The court ruled in April, for example, that the government-initiated ban on Twitter violated freedom of expression and was therefore unconstitutional. LGBT attention is focused on the court with the hope that it will rule that using Article 266 against the transgender community is also unconstitutional.

If it does so, it will be a small yet significant step taken toward enhancing transgender rights. Meanwhile, this year’s Gay Pride Parade in Istanbul, which brought tens of thousands of people together on June 29, was the eighth such parade to be held in Turkey since 2003, and helped highlight the problems faced by this community.

The parade — which also saw participants from other Muslim countries, most notably Iran, who feel relatively safer in Turkey — was not marred by any homophobic incidents of the kind seen in Russia or Ukraine.

The Huffington Post captured the spirit of the parade in a feature under the title “7 Stunning Images From What May Be Muslim World's Largest LGBT Celebration.” Prior to the parade, Yanki Bayramoglu, 23, was elected queen in Turkey’s first transsexual beauty pageant in Istanbul as part of the Gay Pride celebrations during the last week of June.

As promising as all of this may sound, life still remains very difficult for transgender persons in Turkey. They continue to be banned from employment, refused service at shops and restaurants, thrown off public transportation and face violent attacks from the police and the public, as well as relatives out to “cleanse the family honor.”

This is not surprising, given that prejudice against this community is often promoted by the highest level of the Justice and Development Party (AKP) government, led by Erdogan, which has done nothing but obstruct attempts at enhancing LGBT rights.

Erdogan rattled Dutch Prime Minister Mark Rutte during his official visit to the Netherlands in March 2013, when he criticized the case of a Turkish boy, a Dutch citizen, who was adopted by a lesbian couple after having been taken from its biological mother when he was six months old on the grounds of maltreatment. The mother is trying to regain custody of the boy.

During his news conference with Rutte, Erdogan said homosexuality was only “sexual preference, which is contrary to the culture of Islam.” He said Yunus, 9, should be handed over to what he called “secure hands,” adding, “If we say ‘a six-month [old] child cannot make such a decision so it is the judiciary that decides,’ then this could lead us to a big mistake.”

Even if the Constitutional Court comes up with a ruling that favors transgender rights following the application by the judge in Aydin, the situation on the ground will most likely remain much the same for such persons given social taboos based on Islamic morality and widespread homophobic prejudices in Turkey.

Full 84% of Turkish respondents told the “The World Values Survey” in 2011 that they would not want to live next to a homosexual person. While there is no law against homosexuality, members of the LGBT community can still be barred from official institutions or fired from their jobs if their sexuality is revealed, as a police officer from Istanbul, named only as F.E. by the media, discovered in 2009.

According to media reports, the officer’s house was searched after someone informed the authorities that he had child pornography on his computer. The accusation was found to be unfounded, but the computer contained material revealing that the officer was gay.

He was ostracized by his colleagues and lost his job as a result of this, and was fighting an uphill legal battle against the Ministry of Interior. The ministry claimed in June that it had the right to dismiss the officer on the grounds that his homosexuality was not compatible with his job.

F.E. will most likely have no choice but to file a lawsuit with the Constitutional Court eventually, after exhausting all other legal recourse. If he cannot get satisfaction there, he has the right to go to the European Court of Human Rights. At any rate, he faces a long and arduous legal process while his life is in turmoil due to his sexual identity.

Halil Ibrahim Dincdag, a registered football referee, suffered the same fate as F.E. when his homosexuality was also revealed in 2009 and his refereeing license was revoked. There are, of course, much worse cases than these that involve violence against and the murder of transgender persons.

A report prepared by the main opposition Republican People's Party (CHP) in 2013 indicated that at least 12 murders of LGBT individuals had taken place in 2012, apart from countless cases of torture and ill treatment, as well as many attempts at lynching members of this community. The bottom line is that even if the legal environment in Turkey changes to protect lesbians, gays, bisexuals and transsexuals, the difficulties they face are bound to remain for some time due to social prejudices and cultural habits based on religious morality.

This does not mean, however, that the LGBT community is sitting idly and taking what is dished out to it. It is fighting back and demanding its rights, and developments show that the struggle may not be totally futile, despite the mountains of prejudice that still must be overcome.