RONGAI, Kenya — An old three story building in the rural outskirts of Nairobi, Kenya, has become a safe house for Ugandans seeking refuge from harsh anti-gay laws and sentiment in their home country.

Hundreds — if not thousands — of LGBTQ Ugandans have reportedly fled to Kenya since Uganda passed the Anti-Homosexuality Act of 2014. The law, which made same-sex sexual activity punishable by up to life in prison, was nullified a few months after it was signed into law, but its introduction has been credited with fueling the already inflamed climate of homophobia in the country. Homosexuality has been illegal in Uganda for more than a century.

Yusuf entering the gated community in Rongai, Kenya, where she and a friend have rented a one-bedroom house. Rael Ombuor

Yusuf* has been staying at a house in Kenya’s rural Rongai neighborhood with three of her friends for almost two years now. Assigned male at birth, the 25-year-old identifies as a woman.

“I was born like this,” she told NBC Out. “I thought I was alone in this world, because I did not have anyone to share my feelings with.”

“Every Ugandan gay man or woman I have met in this journey has quite a story to tell ... It’s a story of pain and struggle but also a story of hope."

Yusuf grew up in Kampala, the Ugandan capital, and said her childhood was filled with “emotional instability.” It was not until high school that Yusuf, who had not yet transitioned at the time, got a boyfriend and realized she was not alone.

“He told me that he loved me. I was confused. How can a fellow man tell me that he loves me? But I had the same feelings inside me,” she explained.

However, her world came crashing down in 2014, at the peak of Uganda’s anti-homosexuality crackdown, when her father caught her and a boyfriend together. That night, she said her father took a block of wood, severely beat her and left her for dead.

Banned from her family home, Yusuf left Uganda on February 13, 2015, and officially became a refugee. When she arrived in Nairobi, she received word that some fellow LGBTQ Ugandan refugees were living in Rongai. She was able to connect with some of them on Facebook.

Among the Ugandans Yusuf was able to connect with was Elijah*, an old friend of hers from Kampala.

Yusuf making her bed in the one-room house she shares with three others in Rongai, Kenya. Rael Ombuor

A gay man, Elijah was among those named and shamed by Uganda’s Red Pepper newspaper in early 2014. One day after Uganda’s president signed the Anti-Homosexuality Act, the tabloid published a front-page story listing the country’s “200 top homos.” The paper published the names, photos and workplaces of the alleged LGBTQ people.

Elijah not only had his face published in the newspaper, but a sex video he appeared in was also circulated on social media and eventually ended up on a local television channel. He fled Uganda later that year, and he spent sleepless nights on the streets of Nairobi prior to heading to Rongai.

#AHBUganda: The media witch hunt is back. 200 Top Homos exposed in redpepper pic.twitter.com/sbofQxvSyM — BombasticKasha (@KashaJacqueline) February 25, 2014

“Every Ugandan gay man or woman I have met in this journey has quite a story to tell,” Yusuf told NBC Out. “It’s a story of pain and struggle but also a story of hope. No human being deserves to go through what we have gone through in Uganda.”

Even after leaving Uganda, hardship still persists on the road to seeking refuge. Yusuf said she was raped by the person she was living with when she first arrived in Nairobi. She is now HIV-positive.

When most Ugandan refugees arrive in Kenya, they do not speak the local Swahili language and have no legal documentation. This combination makes it difficult to find work and also makes them targets for arrest, according to Yusuf.

“I was arrested twice in Kawangware (a slum in Nairobi) just [because] neighbors [were] complaining about me. Both times I had to pay the policeman to leave me [alone],” she said.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

“When I lived in Waithaka (another Nairobi slum), the police came for me, [and] at that time I did not have the [proper documentation]. I had an asylum seeker pass. They took me to the police station. I gave them [money], and they left me [alone],” Yusuf continued.

Both Yusuf and Elijah are now registered as refugees with the U.N. Refugee Agency (UNHCR) in Nairobi. Yusuf has a document, called a “mandate,” that allows her to be in the country legally, but Elijah still does not. Kenya is more tolerant of LGBTQ people than some of its African neighbors, according to Yusuf, but it is still not safe. Yusuf and Elijah have both applied for asylum and are hoping to be relocated to Australia or a country in Europe.

The houses in which many Ugandan LGBTQ refugees live are in rural Rongai, Kenya. Rongai is quiet and many retirees choose to build homes there. Rael Ombuor

Rongai is a relatively underdeveloped rural area, where tribesmen can even be seen herding cattle in the neighborhood. A number of Kenyans choose to build their retirement homes in Rongai, as it is quiet and serene compared to the busy city of Nairobi.

However, Elijah said it has not been easy living in Rongai. While he feels more secure there than he has in the other places he’s lived, he said it’s not 100 percent safe for gay people.

“When we moved here,” Elijah said, “there was a lady who would come ask every day, ‘What are you doing?” One day, he said the lady told him, “There are rumors that you are gay.”

Days after those comments, Elijah and Yusuf said the house they share was surrounded by 30 policemen.

“They entered the door and ransacked the house. We told them we were under the U.N. and showed them the documents,” Yusuf explained.

The officers eventually left, but a month later, Yusuf and Elijah heard rumors that the community was planning to attack them.

“Moving takes a lot of money that we do not have,” Yusuf said.

Related: Kenyan Artist Brings Visibility to Nairobi's LGBTQ Community

Jane Wanjohi owns a shop just a few yards from where Yusuf and Elijah live and does not approve of her refugee neighbors.

“The ways [these] boys dress, it is obvious who they are,” Wanjohi told NBC Out. “We do not want them here. This is totally unacceptable and un-African. None of us want them here for the sake of our children and society.”

Yusuf said she occasionally buys food from Wanjohi’s shop, and whenever she does, she said she can tell that the whole community, not just the shopkeeper, is aware of who she is. Yusuf said danger lurks every day.

"No human being deserves to go through what we have gone through in Uganda.”

In Nairobi's Kawangware slum, Kion* lives with three of his friends in a one-room house made of sheet metal. They arrived from Uganda about six months ago and have not yet registered with the U.N. They are still deciding on their next move, and in the meantime, all three are working as sexworkers.

"That is the only way we can make money,” Kion said. “We meet guys on this site … They call us, we have sex, and we can afford to maintain ourselves until we figure what [is] next.”

Kion said he has already been beaten up by strangers three times since he’s arrived in Kenya. He said there’s not much he can do to prevent these attacks, because he “cannot hide his gayness.”

Like Kion and many other LGBTQ refugees, Yusuf is also involved in sex work to supplement the money she receives from UNHCR, but she said the risks are high. She said some people pretend to be gay in order to rob gay and transgender sex workers.

“Here, you can visit someone, [and] they take your phone, they beat you. It’s blackmail. In Uganda, we do not have it. Here in Kenya, you end up losing your phone, money and shoes,” Yusuf said.

Related: 'Queer Questions' Podcast Takes on Stigma, Stereotypes in Kenya

Eric Gitari, the director of Kenya’s National Gay and Lesbian Human Rights Commission, said his office handles “numerous” LGBTQ refugee cases.

“Since January 2017, we have dealt with more than 70 LGBTIQ refugee cases,” Gitari told NBC Out, using the acronym for lesbian, gay, bisexual, transgender, intersex and queer. “The peak was in February, when we attended to 47 LGBTIQ refugees."

"We present their cases to UNHCR and HIAS (a nonprofit refugee advocacy organization). We also provide them with legal representation in police stations and court. We also train them on their rights and how to be safe in Kenya,” Gitari added.

He said finding safe places to stay is a challenge for most gay refugees. "Most of their immediate fears are around safety, such as safe housing, because they suffer higher rates of arbitrary forced evictions by landlords.”

Gitari said the “U.N. has offered a lot of help to this vulnerable group of people, but there have been isolated cases where the staff have been hostile toward the LGBTQ refugees. The prejudice makes the process of determining their refugee status a bit slow.”

NBC Out reached out to UNHCR for comment regarding allegations of isolated instances of LGBTQ discrimination but did not receive a response.

President Yoweri Museveni of Uganda on May 11, 2017 in London, England. Hannah McKay / WPA Pool/Getty Images

In March 2002, while accepting an award for his country's HIV/AIDS prevention programs, Ugandan President Yoweri Museveni said, “We don't have homosexuals in Uganda.”

Yusuf said she’s hopeful that one day the people of Uganda will accept the LGBTQ community, but she doesn’t think it’s possible with Museveni leading the country. She and Elijah said life for LGBTQ people in Uganda has gotten worse over the past several years, and they said most of their gay friends in Uganda are in jail.

Yusuf and Elijah both discussed the frustration they feel about their future plans being in limbo. Elijah said sometimes he loses hope and admitted to attempting suicide several times. “I just ask myself, ‘Why can't I die? What am I doing on Earth?’"

Yusuf said when she first came to Kenya, she thought it would just be for a year. It has now been more than two.

“I do not know where I am going. I do not have any plans. I am just waiting for the U.N. to tell me where I am going. Any free country where they are tolerant to gay people, I am ready to go there, to any European country,” Yusuf said.

*Several LGBTQ interview subjects asked that their last name not be shared out of concern for their safety.

Follow NBC Out on Twitter, Facebook and Instagram