A landmark ruling in Lebanon in favour of a transgender man is being celebrated as a leap towards equality, with hopes that discrimination against the transgender community will ease given the subsequent positive media attention the case has received.

In the mid-January ruling at the Court of Appeals in Beirut, Judge Janet Hanna confirmed the right of a transgender man to change his official papers, granting him access to necessary treatment and, importantly, privacy.

The decision marked the first time a Lebanese appeals court has ruled specifically in support of transgender rights to treatment.

Sometimes you find judges that surprise you and make you believe that there is an independent judiciary in Lebanon; it's something that is worth protecting. Tarek Zeidan, Helem spokesman

"The operation was a medical necessity to relieve him [the appellant] from his suffering that had been present throughout his life," the court said in its ruling.

It argued that a person's right "to receive the necessary treatment for any physical and psychological illness is a fundamental and natural one".

When the details were announced, some media outlets welcomed the ruling as the first time a Lebanese was able to change gender. But changing one's gender was already legal in Lebanon, as in Iran, Egypt and many other countries.

Where the ruling was ground-breaking, however, was in acknowledging the psychological considerations of the appellant, who remains anonymous.

Hanna, the judge, has been hailed by activists and the transgender community, as the court recognised when a person does not identify with the gender they were assigned at birth.

Until now, granting papers that would officially change one's gender depended on a set of stringent rules: the man or woman must not be married, have any children, and should be able to prove that gender realignment surgery is complete and irreversible.

"Because this recent case happened in an appeals court, it now means that those judged in a lower court can now go back to this ruling as a precedent," Tarek Zeidan, spokesman for the LGBT advocacy group Helem, told Al Jazeera.

"First, the court recognised the appellant's request to reflect their personal status in accordance with their gender. The second aspect was that it [the court] affirmed the appellant's right to 'correct' the discrepancy between their reality and their gender identity, and affirmed their right to privacy in this matter.

"The third achievement of this ruling was that it said the appellant's documents needed to be updated to reflect the new [appellant's] reality," said Zeidan.

There are no statistics relating to Lebanon's transgender community, but members and activists estimate the minority to be at least in the low thousands.

"Sometimes you find judges that surprise you and make you believe that there is an independent judiciary in Lebanon; it's something that is worth protecting," said Zeidan.

Discrimination and fear

The main barrier for transgender men and women in Lebanon is that their identification documents do not match their gender.

Getting a job and renting property become tasks of immeasurable difficulty, and so, many turn to sex work to "make ends meet", said Zeidan.

Social stigma is rife, even within medical and law enforcement professions. Coupled with high levels of family rejection, many suffer from feelings of abandonment, isolation, anxiety and low self-esteem.

"The whole system in Lebanon is set up based on a binary gender system, including prison and police stations. If [for example] a trans woman is arrested, she will frequently be placed in a holding cell for men."

READ MORE: In America, doors often closed to transgender tenants searching for housing

Yara (not her real name) presents as male and is transitioning to female. She spoke to Al Jazeera on the condition of anonymity.

She said that there is widespread fear of Lebanon's Internal Security Forces, which are responsible for "maintaining public order".

"We fear that someone might call security and accuse us of perversion; this creates a lot of anxiety," Yara said. "When they drag an LGBT person to jail and torture and abuse them, they believe they are doing something right, removing something 'bad' from society."

Yara confirmed that mismatched identification records makes access to employment a monumental barrier, forcing many to leave the country once gender realignment surgery is completed. Once her transition is complete, she too will try and leave Lebanon.

As for surgery, trans men and women elect to have the procedure in North America, Europe and Thailand as there are few facilities in Lebanon which perform the surgery, and they are not only considered inferior quality but also pose a risk.

Some doctors object to the procedure, and it is not unheard of for "deeply religious" psychiatrists to attempt to persuade patients not to go ahead with it, Yara said.

Access to healthcare relating to gender realignment is difficult and expensive, she added, and is not covered sufficiently by social security or most insurers.

Cautious optimism

The recent ruling, Yara added, "came as a bit of a surprise" and was a "positive" development.

"When the law recognises a certain minority, it empowers them…This was an authority saying that these people exist and they need our care," she said, speaking from Beirut.

When the law recognises a certain minority, it empowers them…This was an authority saying that these people exist and they need our car 'Yara'

Aside from the case, a sense of cautious optimism is growing elsewhere. In terms of LGBT support from activists and non-government organisations, a network is growing.

As well as Helem, there is the Arab Foundation for Freedoms and Equality and Marsa centre for sexual health, among others.

But at the state level, an incredible amount needs to be done, Zeidan, Yara and Youmna Makhlouf, an attorney with Legal Agenda, a local non-profit advocacy group, all agree.

"Seeing judges recognise the complexity of the issue – that's something very positive…and because of this decision, the media is interested. There has been positive coverage of the transgender community's situation, which in turn puts them in a better position in society," Makhlouf told Al Jazeera.

"[But] of course [the ruling] is not enough. It doesn't mean all of the problems regarding transgenders in Lebanon are solved."

Makhlouf has around 20 transgender clients who seek her legal advice.

"There are much bigger problems, like not having a job, turning to prostitution, encountering physical violence and not having access to a legal system when you are in sex work.

"In the criminal code, there is no incrimination of transgender - the problem is that some people would be rejected.

"After this ruling from a court of appeal, maybe things can evolve," Makhlouf pondered. "It should also involve the coverage of medical treatment... It's too soon to say about these things. This will be built upon."

Follow Anealla Safdar on Twitter: @anealla