Media playback is unsupported on your device Media caption 'I realised I fancied girls more than boys'

Homosexuality is a taboo subject in Afghanistan, rarely discussed in the media and widely condemned as immoral and un-Islamic. As a result there are no statistics indicating the size of the lesbian, gay, bisexual and transgender (LGBT) community in the country.

The BBC spoke to four Afghans with different sexual orientations. All told stories of a life in hiding, but all were determined to stand by their identity. All names in the article have been changed for safety reasons.

Zainab is 19 years old and lives at home. But her parents and siblings have no idea what she feels.

"I was 15 or 16 when I realised that I had a dislike towards men," she says.

"I was working in a beauty salon. There were lots of girls around me and it was then I realised I fancied girls more than boys."

Zainab says it took her years to find the courage to come out to her first partner.

Media playback is unsupported on your device Media caption 'The first time it happened I felt sexually awakened'

When Zainab confessed to a friend of many years that she was in love with her, the reaction was one of shock.

"I told her that 'the feelings a boy normally has towards a girl, I have those feelings for you'. For a while the friend withdrew, but later the two became a couple.

Zainab says they managed to meet up once or twice a week, but the relationship remained hidden.

"There are lots of lesbian women but they can't talk about it openly," Zainab says. "In Afghanistan, being lesbian is seen as un-Islamic. If people found out, the result would be death. My family must never know."

The fear of rejection and reprisals, even death is shared by all the Afghans who spoke to the BBC for this report.

They also share the problem of family pressure to get married to a partner from the opposite sex and conform to the norms of traditional Afghan society.

Image caption There are no gay bars in Kabul, but there are some places where LGBT people feel welcome

'We could be hanged'

Dawood realised he was gay at the age of 18. Nevertheless he got engaged to a woman.

"It was arranged without my consent," he says. "I wanted to cancel it because I had no feelings towards the opposite sex."

The engagement was reversed and Dawood says he is in a happy relationship with a man now.

"It is very deep. When we meet up we feel like we are in a different world."

But Dawood too is forced to live a double life.

"In Afghanistan homosexuality is seen as shocking, as a negative phenomenon. If we are discovered, perhaps we could even get hanged," he says.

Read more:

Gay Pakistan: Where sex is available and relationships are difficult

Fighting the views of homosexuality in China's textbooks

Gay Afghan defies tradition to expose identity

The legal situation for LGBT people in Afghanistan is not explicitly clear on paper, but law professionals and the gay community are in no doubt that homosexuality is seen as a crime.

Article 427 of the Afghan penal code refers only to "pederasty" - a sexual act between males, one of them understood to be a youth or a boy. The act is punishable with "long imprisonment".

Image caption Article 427 of the Afghan Penal code mentions pederasty as a crime

However Dr Niaz Shah of Hull University in the UK, an expert in Afghan and Islamic law, says that the penal code reflects the underlying Islamic principle that homosexuality is banned.

"Islamic law allows only one form of sexual relationship and that is between an adult man and a woman when they are married," Dr Shah told the BBC. "If two young boys announce that they are gay and want to have a gay relationship, it will outrage people; there will be people who might really want to kill them."

Dr Shah says that while homosexuality was and is practised in Afghan society in a variety of male-male relationships, people do not see themselves as gay and often go on to marry women.

The concept of gay love is alien to Afghan society, he says.

"I am not aware of a gay relationship in Afghanistan where two males openly express love for each other and want to live as a couple to the exclusion of any sexual relationship with a female."

Prominent Afghan cleric Shams-ul Rahman told the BBC there was broad consensus amongst scholars that execution was the appropriate punishment if homosexual acts could be proven.

"An old wall should fall on them and they should be killed in the harshest of manners," he said.

Out and proud

One Afghan who wants to change how LGBT people are treated is rights campaigner, Nemat Sadat, who came out himself three years ago.

Image copyright Nemat Sadat Image caption Nemat Sadat was ostracised by family and friends after coming out in 2013

"I was abandoned by most of my family and relatives who have all been in the West for longer than in Afghanistan," he told the BBC from Washington where he now lives.

"Even the educated elites, - people who studied at Berkley and Harvard - have a hard time accepting me."

Sadat was born in Afghanistan, but grew up outside the country, returning only in 2012 to start an academic career. After coming out he says he lost his job at the American university in Kabul amid pressure from the Afghan authorities.

He says he talked to a lot of LGBT Afghans while in Kabul to find out about their lives.

"Like anywhere else there are places where gay people meet like gyms and parks and malls," he says. "But most of these connections don't lead to much, maybe just a one-time encounter."

As most people live with their families, he says they can't really take anyone back home, so they have to rent a place like the back room of a store.

"What I found overall is that it is very hard to establish long term friendships and relationships. LGBT people are trapped by Sharia law and can't even demand their right to exist, let alone marry who they truly love."

Rights under pressure

Nemat Sadat is hopeful that LGBT people will ultimately gain rights and freedoms in conservative Muslim societies.

But even in the West where he now lives, those rights are under pressure and often only recently established.

And it's not just Islam which views homosexuals as immoral.

In Germany, for example, homosexual acts between men were illegal until as recently as 1994 and the state is only now preparing to pay compensation to those who were prosecuted.

Image copyright Reuters Image caption People dance during the annual Gay Pride parade in Berlin in July this year

In Afghanistan such changes seem a long way off.

Shamela, a 24 year old transgender who was born a boy, says she always liked "girly activities", playing with dolls and mixing with girls even when she was small.

But as an adult she now has to hide her preferences.

"I lock myself up in this small room like a prisoner," she says. "I do my make up in front of the mirror, play music, watch TV and dance."

Image caption Shamela says she loves to make herself up and dance - locked away in her room

Her partner also insists on secrecy.

"He is very strict and wants me to dress like a man in public," Shamela says. "My biggest regret is that I was not born a woman. I would love to have children, a good husband and a good life."

Everyone speaking to the BBC cited such feelings of soul searching, exclusion, and of being stuck between hope and hopelessness.

But all are determined to stand by who they are.

Campaigner Nemat Sadat is hopeful, but says change can only come if LGBT rights are seen in the context of a broader campaign for minority rights.

"There won't be a flourishing LGBT community, or women's rights or any other minority rights until we stand united."

Additional reporting by Auliya Atrafi and Johannes Dell