We were sitting on the cliffs as darkness fell, obscuring our view of the niches across from us where the giant Buddhas had for centuries smiled upon the fertile valley. It had only been a few years before that they were blasted away by the Taliban.

The young man who sat close to me, a translator I had hired in Kabul, was curious about the ways of the West, asking me if I had a girlfriend.

My answers baffled him, as I told him not all men have to be with a woman; they can find companionship in other ways. For the twelve hours on the rough and tumble, largely unpaved road between the Afghan capital and Bamiyan, I had spoken in the same riddles whenever he asked about my relationships, his face twisted with confusion as he tried to comprehend me.

Only in the morning, as we were leaving the hotel, did he put it all together. And it was in this way that he understood the feelings he had also been unable to grasp about himself, to define the way he too felt about other men. Certainly he knew men could be attracted to other men, something often expressed sexually by Afghan males beginning in puberty. Yet for him, the sense of who and what he was ran deeper beyond mere sexual attraction.

I was reminded of the translator this last month, as the unusual confluence of Gay Pride season and Ramadan, both of which just ended, along with the Orlando massacre, led to a growing form of mutual understanding within both the Muslim and LGBT communities.

Both groups, now sometimes seen together at Pride marches and other demonstrations carrying signs against Islamophobia and homophobia, are trying to seek new ways of working with each other and see where interests overlap, despite past obstacles.

Some of the communication has included outspoken LGBT Muslims themselves like Imam Daayiee Abdullah, to coordination among groups in various cities, including in New York, where the organization Women for Afghan Women, which advocates on Afghan women’s issues, held a forum with the city’s chapter of SALGA, a group for South Asian LGBTs, and other advocacy groups on how LGBTs and Muslims, particularly Afghans, can work together on these issues.

Perhaps this new communication will mean that fewer men like Omar Mateen, the Orlando killer, thought to possibly be gay or at least in some way attracted to men (though the FBI found no evidence of the same), will grow up confused about their sexuality and place in the world.

In my own travels, distilled in the book I edited, Gay Travels In The Muslim World, I sometimes came across circumstances which called to mind the need for such communication, sometimes in places with little knowledge of homosexuality as we know it, such as Afghanistan, where Omar Mateen's family was from.

To be sure, Mateen’s circumstances were different from those of my translator. Mateen was born in the United States, not in a war town country, cut off from media and other ways of learning to understand his sexuality.

Soon after the American invasion of Afghanistan in the aftermath of September 11th, I read of the seeming paradox of Taliban killings of men who had sex with men, while they simultaneously engaged in the same behaviors themselves.

As a gay journalist, I decided to venture into Afghanistan to learn more firsthand, reporting for LGBT publications in the United States like Gay City News, the now defunct Genre and others.

Afghan-American friends warned me I would find a country with values stuck somewhere in the Victorian age when it came to same-sex sexuality, but instead I found something different: a place where discussion of sex between men was shockingly common, a Victorian sense more Oscar Wilde than Queen Victoria on the love that dare not speak its name.

My journeys included Kandahar, the former Taliban stronghold. Here fields on the outskirts of town bore the traces of collapsed mud brick walls which had been toppled as punishment over men caught in the act of sodomy.

Yet homosexuality was so ingrained in the lure of Kandahar that a famous Afghan phrase said birds flew over the city with one wing, the other protecting their backsides from possible penetration.

I ventured to remote villages in the poppy fields surrounding Mazar-i-Sharif, where Afghan commanders paid enormous sums to watch boys dressed as girls dance for their enjoyment, bidding for the chance to have sex with those they liked, essentially committing a culturally accepted form of underage rape (as described in the Daily Beast last year).

I was only able to interview men who had aged out of the process, but the stories I uncovered in 2004 on the topic seemed so farfetched that some editors in New York refused to believe what I found. Wasn’t any notion of homosexuality in any Islamic country, let alone war-torn Afghanistan, forbidden?

It was not until years later when Frontline covered the phenomenon, in the 2010 documentary The Dancing Boys of Afghanistan, that it came into Western consciousness. Among the scandals was that this horrific abuse of young boys by Afghan soldiers was often overlooked by the United States military in its training of the country’s army.

Even Kabul was full of its surprises: men would talk of homo-sex, or sex among men. Some of these conversations were in front of mosques. At a no-longer-existing Soviet-era pool in the Babur Gardens, men told me the Taliban was full of “playboys,” or men who had sex with each other, who would have loved to look at their swim-suit clad bodies, had that been allowed at the time.

Far from the Victorian sensibility my Afghan-American friends warned me about, it was instead a place where sexuality among men was unusually open.

Yet this did not mean the men I met who had sex with other men were gay in the Western sense. In fact before my trip, one female journalist had told me to “throw away any sense of what it means to be gay in the West.” She reminded me that this was different from being in the closet, or on the down low, the expression often used among inner city minority men. It was truly something different.

I found that sex between men was not so much a phase that men grew out of, as might have been the case in Victorian England (and today in elite British schools like Eton), but something culturally accepted. A common phrase I heard from men in Kabul was that “women are for babies, men are for sex.”

I knew I was also far from the only Western journalist to write of this. In his memoir of exploring the country during the Taliban era, An Unexpected Light, the straight British writer Jason Elliott mentions men who made sexual overtures to him, taken in by the beauty of his soft skin, unaffected by years of war and sun damage as theirs is.

The only men I met in my various trips to Afghanistan who truly identified as gay among the Afghans were those who had once lived in Pakistan, exposed to Western media images of gay men. Armed with English language skills, such men often worked as translators within the diplomatic corps, meeting Western men who identified as gay, giving them words for their feelings and identity when it went beyond simply sexual desire and morphed into same-sex love.

As I continued to write on LGBT issues in the Middle East and other Muslim countries, I came across similar manifestations of this seeming paradox.

Ideological Islam creates a duality hard for westerners to fathom. The strict separation of the sexes—men from women—creates an entirely homosocial culture—this in turn can lead to homosexual behavior, at times openly discussed, at times not.

Homosexuality from a behavioral perspective—men having sex with men—is not the same as a gay identity, or identifying as gay. Men who engage in these behaviors are still expected to marry and have children in the way that Omar Mateen himself had done in the United States.

Yet for those who are gay, where sex becomes about identity, a cognitive dissonance can occur, along with a desire to continue the behaviors, now part of an identity, in secret.

In my editing of Gay Travels in the Muslim World, originally published by Haworth Press, now by Routledge, I and contributors wrote on this issue throughout the broader Muslim world, including within immigrant communities of the United States, Canada and Europe.

There was at times a clash between the broader community, open to the expression of gay identity, and the immigrant culture which might try to suppress it.

None of us ultimately know what was in Mateen’s head, but these thoughts entered my own when reading about his struggles which may have led to his own conflicted attempts to express his desires sexually and emotionally, while still remaining within the confines of his own community, especially that of his father, who appears to have been homophobic based on interviews.

For the sake of argument, I am also painting in broad, and some might say, Orientalist strokes. The Muslim world is vast and different from country to country. After Israel, Lebanon is perhaps the Middle East’s most liberal country on LGBT issues. Its mix of Phoenician openness and French sensuality is a world away from Wahhabist Saudi Arabia, or even Indonesia.

As I often remind audiences who come to hear me talk on Gay Travels In The Muslim World, the phrase ‘the Christian world’ rings odd to Western ears. Paris, France takes a very different view on LGBT issues from Paris, Texas yet they are both predominantly Christian cities. Catholic Spain celebrates same-sex marriage while Orthodox Russia condemns it.

The Christian world is also not immune to cognitive dissonance on LGBT issues. Religious leaders and conservative politicians in the United States often condemn homosexuality, while leading secret gay lives.

An attempt to understand Afghan male sexuality is not meant as an excuse for Omar Mateen’s mass murder of fellow LGBTs, but at least a way of peering into the ugly abyss, and perhaps with this understanding of cultural homophobia—in America and abroad—as a way to educate and prevent such tragedies again.