Wambere fought an increasingly losing battle for gay rights in Uganda for 14 years, but on Tuesday, he formally requested asylum in the United States, saying his nation’s tough new antigay law has made him terrified to return home. Standing in his lawyers’ offices in Boston, Wambere said he fears being imprisoned or killed.

“This has been a very, very difficult decision for me,” Wambere, 41, a founder of a gay rights organization in Uganda, said at a press conference with his legal team at the Gay and Lesbian Advocates and Defenders, or GLAD, in Boston. “It gives me great pain not to be with my community, allies, and friends while they are under increasing attack.”

An emotional Wambere also urged religious and political leaders in the United States to intensify sanctions against the African nation and some American evangelicals who, he said, campaigned against homosexuality in Uganda, including Scott Lively, an independent candidate for governor in Massachusetts.

Lively, reached by phone, acknowledged that he visited Uganda in 2002 and 2009 and is critical of homosexuality, but he said, “That doesn’t mean I think people should be thrown in jail for that.”

He said he believed the Ugandan law’s punishments are too harsh, and that he had suggested that they focus instead on “rehabilitation and prevention.”

‘It gives me great pain not to be with my community, allies, and friends while they are under increasing attack.’

He was skeptical that it was too dangerous for Wambere to return home.

But the State Department has said discrimination against gays and lesbians is one of the most serious human rights violations in Uganda. Human rights leaders have said that Ugandans have been jailed, beaten, and even threatened with death for being gay. Some newspapers have outed gay people by publishing their names, photographs, and work and home addresses.

Wambere came to the United States in February to seek support for gay rights in Uganda. Days later, President Yoweri Museveni signed a bill that imposes a sentence of up to life in prison for same-sex conduct. The law also created penalties for “aiding and abetting” homosexuality, according to GLAD. Western leaders condemned the new law; President Obama called it a danger and an affront to gay people.

“The situation in Uganda has only gone from bad to worse since John arrived in the United States to raise awareness,” said Janson Wu, one of Wambere’s lawyers at GLAD. “John now runs the risk of life in prison simply because of who he is.”

Officials for US Citizenship and Immigration Services declined to comment on Wambere’s asylum request, which he mailed Tuesday.

Wambere, a well-known activist for the lesbian, gay, bisexual, transgender, and intersex community in Uganda, said in an interview after the press conference that he has been evicted, arrested three times, and beaten unconscious because he is gay. He is a founder and leader of Spectrum Uganda Initiatives, which advocates for gay people.

In 2011, his friend David Kato, a gay rights leader in Uganda, was beaten to death with a hammer.

Over time, the harassment took a toll on Wambere, a tall man who has been featured in a film called “Call me Kuchu.”

He rarely went outside. He hid the knives in his kitchen in case a visitor tried to attack him.

He began to worry that police would arrest him at work — or that a mob would bang on his door late at night.

Since the Uganda law took effect, Wambere said, the already tenuous situation for gays and lesbians in Uganda has deteriorated. He said gay activists stopped answering their phones. A group of thugs attacked a man staying in Wambere’s home.

In Cambridge, where Wambere is staying, his hosts urged him to seek asylum.

“A lot was piling up,” said Wambere.

He said he was conflicted about seeking asylum. He worried about the safety of his 16-year-old daughter and friends in Uganda if he returned home. He also worried that fellow activists would think he abandoned them if he stayed in the United States.

Tuesday, he vowed to continue fighting for gay rights in Uganda from Massachusetts, the first state in the nation to legalize gay marriage. His visa to stay in the United States expires Wednesday.