Usaam Mukwaya realized his American dream at a bar that reeked of sweat and stale beer, where a hunk of a bartender doled out Heinekens and whiskey sours. Men danced and freely kissed other men under strobe lights while a Rihanna track wailed through the loudspeakers.

But when Mukwaya looked out the window, he got nervous. He saw another type of blinking light: the red, white and blue lights of police cars. Too many times, he’d seen officers on the hunt for places like this, looking to lock up people like him. Then he remembered that he was not in Uganda.

“They’re not coming to arrest us!’’ Mukwaya, a usually soft-spoken 28-year-old Ugandan told his two friends, jumping a little with relief.

This bar, the Fireplace, on P Street NW, is the kind of place the three men had always dreamed of, a place in which men who have sex with men could gather without fear of prosecution or persecution. Within seconds, a man had asked Michael Ighodaro, a lanky 25-year-old Ni­ger­ian with a demure smile, to dance.

Teah Wright, a 31-year-old Liberian with a deep voice, grinned and declared: “Friends, these are the best days of our lives.”

Hours before, the three men were travelersfrom disparate parts of the same continent, bound together by a single struggle. They met near the booth for the group African Men for Sexual Health and Rights at the International AIDS Conference, held this week at the Walter E. Washington Convention Center. They talked about the need for African gay men like themselves to create an indestructible activist network.

And then, Wright asked, “Where are the [gays] going out tonight?”

For these new friends, the simple question of where to gather socially held a special significance.

In Uganda, Mukwaya has fought bills threatening to make homosexuality a crime punishable by death and to imprison those who don’t turn gays over to authorities. In Liberia, Wright organizes against a law that could make same-sex marriage a crime punishable by up to 10 years in prison. In some Ni­ger­ian states, gay men can be stoned to death.

Most gays in Africa hide their private lives. “We become the world’s best actors at home,’’ Ighodaro said.

Now, for the first time, they were playing on a different stage, the United States, a country with a leader who says they, too, should be able to marry. Accustomed to secret talks on Skype in which they arranged to meet in private homes behind closed doors, the men felt a subtle thrill as they openly made plans to party.

Here, gay people didn’t party in the shadows. There is a freedom in the night.

“Again,” Wright asked, “where are we going out?”

“How about the Fireplace?” Mukwaya suggested. “It’s by my hotel.”

“I heard people say that’s the place where black men go to meet old, white men.”

“Where on earth would you hear that?” Mukwaya asked. “Those are just stories.”

Fleeing persecution

Mukwaya’s own story became well known in certain circles after it was related in a 2008 Human Rights Watch report.

Police in Kampala, Uganda’s capital, first arrested him in connection with protests calling for more resources for groups serving gay, lesbian, bisexual and transgender Ugandans. A month later, police apprehended him on his way to a hotel and took him into a darkened room. By his account, officers cut his knees with razors. They strapped him to a contraption that forcibly stretched his arms. They stripped him down to his underwear and repeatedly questioned his manhood.

When the media began listing names of suspected homosexuals, Mukwaya’s name appeared often — along with his picture and his address.

“They called me ‘Champion of Homos,’ ‘Celebrity of the Homos,’ ’’ he recalled. “I had to leave my family, I couldn’t be seen. If I was seen, I was attacked, for sure.

“Then I started to send a boy out to get my groceries. When they found out who he was helping, they attacked him, too.”

It was either leave Kampala or die. He fled and sought political asylum in Paris. There he works with an organization targeting homophobia in French-speaking countries. The group sponsored his attendance at the AIDS conference this week.

Before heading out to the Fireplace, Mukwaya stared in the mirror in the Dupont Circle Hotel. Reflected was a man with a square jaw and dark, smooth skin. He loosened his belt, so his gray slim jeans sagged below his boxer briefs. He sprayed two puffs of Zara cologne on his neck. He decided to leave his sunglasses at home.

“Do Americans wear them at night?” he asked. “I don’t know.”

After learning to ignore the police cars passing the club, Mukwaya was relaxing when one of his friends told him about a false rumor floating through the crowd. Another man attending the conference was saying that Mukwaya had a rendezvous with another guy.

On its face, such rumors weren’t a big deal; lots of men hook up at the conference. But after being outed in the newspapers in Uganda, such loose talk made Mukwaya uneasy. What if someone told the wrong person and the information made its way back to Uganda? That could only bring more pain to his family.

“I’m out and proud to be gay, but there are some instances when people might not need to know that information about me,’’ he told the gossiper. “It isn’t your right to tell. You are not a newspaper.”

Upset, Mukwaya left the party early. It was 12:43 a.m.

‘We can act like ourselves’

The buzz at the booth the next day was about a swanky nighttime reception, sponsored by the American Foundation for AIDS Research, to be held at gallery nearby. Mukwaya arrived in a gray suit and navy blue shirt. He sipped red wine and collected business cards.

As servers offered wine and beer on silver platters, the conversations become louder, hands become looser and conversations became friskier.

“At a conference, we can act like ourselves,’’ Ighodaro, the Ni­ger­ian, said. “You don’t have to put on a street face. You can put on your real face, have conversations in your real voice and pick up a conference boyfriend.” Nowadays, there can be several local and regional AIDS conferences in a given year.

When someone suggested he would rather stay in the United States than return home, Wright objected.

“America is a hard country,’’ the Liberian said. “I live in a home. Here people live in apartments. I have two cars. Here I have to take cabs. Why would I leave? In my country, I live like a king.”

He giggled.

“Well, a princess, really.”

As he spoke, a 6-foot-4 man with a huge smile came up and wrapped Wright in a hug. They shared a friendly kiss on the lips.

“Man, if I did that in my country, they would attach a stone to my leg and throw me into the water,” Wright said, laughing.

The man was concerned. “Really? Is that the penalty in your country?”

“Mob justice,” Wright responded. “Don’t worry, man. Have a good time.”

The man was John Wambere, 39, one of the most well-known gay activists in Uganda. This was his first time in the United States. Over the past month, he had traveled with producers who featured him in a documentary about LGBT activism in Uganda called “Call Me Kuchu,” a name hung on gay men and lesbians in that country.

“Now I am here in the District, and I love it,” he said. “My favorite place so far has been Secrets,” a popular all-male strip club. “It was just so — wow, I don’t even know the word. But you look at this expression, and this is a different reality. I look at those men, beautiful men, and see people living a life they choose to live. It’s a freedom.

“Democracy isn’t just about politics.”

Still, he couldn’t persuade anyone at the party to go there with him this night. Wright walked out of the gallery in the arms of another man. Ighodaro was too tired to go out; he had a presentation, based on his experience as a gay man living with HIV, at 7 a.m.

Mukwaya decided he would go with two others to the party that was the talk of the conference, taking place at Remingtons on Capitol Hill.

When they arrived, they saw two dozen people milling outside the door. Half of them were missing either a shirt or pants. A few wore neither.

“It’s $15 with all your clothes,’’ a man from France told Mukwaya as he waited in line. “But if you take off your pants or your shirt, it’s only $10.”

Mukwaya wasn’t persuaded.

“If someone forces me to take off my pants,” he said, “I will refuse.”

No one forced the issue when he walked into the club, a kaleidoscope of races and genders. The partyers came in all shapes and sizes.

Of underwear, that is: boxer briefs with superhero logos on the front, sequined boxer shorts, pink lace panties, plain old tighty-whities.

“Wow,’’ said Mukwaya, giggling. “But I refuse to take off my clothes.”

Mukwaya would later admit that he harbors some guilt about experiencing such freedom when so many like him continue to live in fear in Uganda. He dreams of a day when he can return to his land and live freely.

But just then, the pumping bass was impossible to ignore. Mukwaya loosened his belt and let his pants sag. He and his friends took to a corner and swayed to the music. Rihanna started to play. Mukwaya shook his legs until they grew elastic. An African drumbeat kicked in. A man with a mohawk approached and began rubbing his body against Mukwaya. The man unbuttoned two buttons of Mukwaya’s shirt. Then Mukwaya unbuttoned the rest of the shirt himself.

This was partying freely in America. Above him, a banner read: “No Pants, No Problem.”