SIEM REAP, Cambodia — It wasn’t so long ago that gay life throughout Cambodia played out under a tree after nightfall. Or perhaps in the darkest corner of a public pool’s changing room.

In much of the country, it still does. “Maybe it’s by the river, maybe it’s in the park,” said Sopheara You, who is 38, Cambodian and openly gay. “Everyone knows the secret places.”

But in Siem Reap, the fastest-growing city in this hardscrabble kingdom, the secret is out.

Once a dingy outpost, the town has built cachet as an emerging travel hot spot for gay men. And the influx of a Western-style gay scene, replete with cocktail bars and all-male bathhouses, is beginning to nudge the local gay scene out of the shadows of a society where Buddhist open-mindedness is tempered by societal concerns about marriage and reproduction.

Siem Reap’s appeal to gays and straights alike is its proximity to Angkor Wat, a 12th-century temple complex and jewel of the once-mighty Khmer empire. Jungled over for centuries, and more recently unreachable thanks to the murderous Khmer Rogue regime, the temples finally regained their mass tourist appeal in the late 1990s.

The first wave were backpackers with an appetite for rough travel. Then, with the waters tested, a more pedestrian breed of traveler descended on Cambodia.

In the early 2000s, a gay American hotelier named Martin Dishman did the math. “I looked at the arrivals report,” he said. “There were 1.1 million visitors to Cambodia and no gay bars.” So in 2004, he opened the country’s first, Linga Bar, in Siem Reap.

Seven years later, with roughly 1 million annual tourists to Siem Reap alone, the 170,000-population city has given rise to roughly 20 gay-themed hotels, bars and saunas.

“I got here in 2007, when the tourist boom was really strong,” said Dean Williams, 40, a gay New Zealander and former radio journalist. “It was exploding.” Three years ago, Williams joined the growing ranks of gay-owned businesses and opened Miss Wong’s, a crimson-painted cocktail bar and sultry ode to 1920s-era Shanghai.

“Before I came, I knew what most people knew about Cambodia: it had been through a horrendous civil war, half the economy was still from international donor aid, corruption is rife,” Williams said.

What he had yet to unravel is Cambodia’s complex stance on same-sex couplings. The culture’s Buddhist tolerance has helped the foreigner-led gay scene thrive unabated. Buddhist teachings instruct followers to treat people with other views or lifestyles with loving kindness. But much of Cambodia still regards homosexuality — or, better put, relationships that do not produce children — as an outright threat to survival.

Want to slip into the jungle with a buddy? Fine. But refusing to marry someone of the opposite sex and procreate is almost unthinkable in this largely traditional society. In Cambodia’s agrarian society, children are relied upon to support parents as they grow old and unable to toil the fields. There is no other social safety net.

“The pressure comes from family,” said Sopheara, who came out 10 years ago at the age of 28. “When I finally told my mom, she said, ‘I’m not blind, you know.’ But she was also worried and wondering who could take care of me when I’m old.”

Sat Savat, 21, had to deflect similar fears from his mother when he came out just two years ago. “She was like, ‘Well, I’m not surprised.’ But she has no education. She still asked, ‘How are you going to have a kid?’”

Still, for young men like Savat, Siem Reap’s newfound gay flair has allowed him to live a life that simply wouldn’t fly in his rural home village.

If Sat ever worked the fields, his callouses have long since softened. His hair is a perfectly tangled mop. And in a country where many scrape by on $1 per day, Sat, a hotel receptionist, has obtained an iPhone outfitted with “Grindr”: the globally popular application that displays GPS-tracked locations of gay men in the immediate vicinity.

“There’s been a big change here,” Sat said. “I look back to when we had no open life for gay people. Well, look at us now!"

“They’re happy,” he said, gesturing to the foreign clique of gay bar owners gathered for white wine at a downtown bar. “And we’re happy too.”

Happy, perhaps. But Western gay men in Siem Reap are just as often confounded by Cambodia’s wildly different attitude towards male-on-male sex.

“Back in New Zealand, I had a lot of straight male friends,” Williams said. “I don’t know many who’d go off with their rugby buddies, get it on and then get married to a woman in six months. And invite that same friend to the wedding.”

In Cambodia, that is somewhat common, he said. “Not that I sleep with a lot of guys,” Williams said, “But I’ve been to numerous weddings of guys I’ve slept with.”

Cambodians also do not share the Western puritanical “one-strike-and-you’re-gay” rule. Because chastity is demanded of young women, many guys resort to finding relief with one another.

“Good girls don’t put out,” Dishman said. “So what’s your option? Celibacy? Go to a prostitute? Or do your male friend?”

Those who choose the latter are typically not permanently branded as freaks by their straight male peers, Sopheara said. “At school, guys have no contact with women,” he said. “So maybe they get together for fun then get married and forget about it.”

Many truly gay Cambodians avert controversy by blending into the milieu of straight guys who’ve fooled around with buddies. All but a small percentage defy their family’s wishes and settle with a same-sex partner.

Not that gay matrimony bothers the kingdom’s top moral authority, former King Norodom Sihanouk.

“I’m not gay, but I respect the rights of gays and lesbians,” the king wrote on his French-language Web site in 2004. The message went on to endorse gay marriage in Cambodia and proclaimed God’s love of “a wide range of tastes.”

The monarchy, which has no executive powers, is now headed by Sihanouk’s son, King Norodom Sihamoni. Gay Cambodians note with a wink that the king is a style-conscious bachelor and former ballet instructor in Paris. His mother has explained diplomatically that her son “loves women as his sisters” and is not expected to marry.

But while the royal family represents many Cambodians’ mellow tolerance, its prime minister offers the counterpoint. The premier, Hun Sen, abandoned his adopted teenage daughter in 2007 for partnering with a woman.

His rationale? According to China’s state-run media, Xinhua, he said “We are concerned that one day her girls take bombs (sic) and poisonous materials to our house and we all will die.”

But these cultural complexities are largely invisible to the gay male tourist passing through Siem Reap, Dishman said. “It’s nice,” he said. “People don’t look down on you or give you any attitude.”

He and his fellow gay business owners are even pushing a slogan — “Adore Cambodia!” — to market Cambodia’s friendliness to gay travelers.

A Siem Reap-based travel agent, Sven Zika, says the city’s reputation is still evolving. “A lot of people still think of Cambodia as land mines and war zones. But Siem Reap is trendy,” he said, “and gay people like trendy places.”

“Really, gay couples are happy if they don’t have to tell a travel agent that they want a king-size bed” instead of two twins, Zika said. “They want acceptance.”

Among Siem Reap’s gay-owned businesses, there is Linga Bar, the flagship gay bar, which is staffed by sleeveless, copper-skinned young men. Just up the alleyway is Miss Wong’s, a more sedate cocktail lounge. The cosmopolitan Station Wine Bar is the newest gay establishment. As for gay-owned lodging, there is Viroth’s and the suggestively titled Golden Banana and Cockatoo resorts.

So evident is Cambodia’s gay wave that regular guesthouses have started fixing rainbow flags on their doors.

Too poor not to hustle and adapt, Cambodians have learned to court the “pink dollar,” a euphemism for gay travelers’ spending power. In the U.S. at least, gay men report spending a third more than straight or lesbian travelers, according to the U.S. Travel Association.

“Because we usually don’t have children, we tend to spend more money,” said Jim Elder, a frequent traveler to Siem Reap and former owner of a gay bar in Bangkok. As a hobby, he posts travel tips for gay men on his Web site, CambodiaOut.com. “That’s what it boils down to,” he said. “We have disposable income.”

While hotel owners might shrug off public canoodling between gay male couples, “the problem is with the guests,” Sopheara said. “A lot of them don’t like it.”

At his enterprise, the Men’s Resort, canoodling is encouraged. As its name suggests, it is a boutique hotel and sauna complex exclusively for men. In lieu of coy innuendo, he and his French partner promote the resort with images of men showering, men draped over men in a sauna room, men in bath towels eyeing one another.

“Cambodia’s gay scene is much more out than it used to be,” Elder said. “In comparison to Vietnam or Laos, anything to do with sex feels repressed. Not in Cambodia, not anymore.”

But could Siem Reap become too open and slide into vice?

Just next door in Thailand, gay sex tourism thrives in an atmosphere of exploitation. In Bangkok and coastal Pattaya, known as “Sin City,” $40 buys an evening with a guy, and in many cases young boys, found gyrating on stages. As in go-go bars that rent female company, a customer need only call out the number fixed to his or her selection’s thong underwear.

Siem Reap has its “money boys,” slang for males trading sex for cash, and they are easy to spot downtown. “We do have that market,” said Dishman, who is receiving more and more e-mails inquiring about the town’s sex-for-sale scene. He also owns a spa “for men, by men” and two hotels: the deluxe Be Hotel and The One, which has only one room.

“I tell customers, ‘If you’re coming here to get laid, you’ll be disappointed.’ We’re next to the biggest gay mecca in Asia, Thailand, and we don’t want to compete,” Dishman said. “We don’t want to develop into that whole go-go boy scene.”

For now at least, Siem Reap gay life remains free of this type of sex seeker and chic enough for culturally curious gay travelers. The vibe, Williams said, is just right.

“Siem Reap’s not about jamming yourself into pink hot pants and dancing all night, under a mirror ball, out of your mind on ecstasy,” he said. “Tourists here get up at 5 a.m. to see sunrises at the temples. So I don’t think it will ever turn into Pattaya.”

This story is presented by The GroundTruth Project.