Updated

Responding to growing international criticism of anti-gay efforts in Uganda, the government said in a statement Friday that it does not discriminate against people "of a different sexual orientation."

"No government official is (supposed) to harass any section of the community and everybody in Uganda enjoys the freedom to lawfully assemble and associate freely with others," the statement said.

It was signed by Ethics Minister Simon Lokodo, the official accused by gay activists of orchestrating a hate campaign that includes breaking up gay conferences and threatening to expel civil society groups he says promote homosexuality in the conservative east African country.

This is the first time the government is making a statement that appears to recognize the rights of gay people in Uganda, where most homosexuals remain closeted for fear of attacks, and it seemed to take even the activists by surprise.

"I think we've really challenged Lokodo now, as this statement shows," said Frank Mugisha, a prominent gay activist. "He's facing the pressure."

Homosexuality is already illegal under Uganda's penal code, and in 2009 a lawmaker with Uganda's ruling party introduced a bill that proposed the death penalty for what he called "aggravated homosexuality."

Parliamentarian David Bahati said at the time that homosexuals deserved to die for recruiting young, impoverished children into gay culture by luring them with money and the promise of a better life.

The bill has since been shelved. Uganda's president said it hurt the country's image abroad. The bill has been condemned by some world leaders, with U.S. President Barack Obama describing it as "odious."

But the bill is highly popular among local Anglican and Pentecostal clerics. Some recently petitioned the authorities to quickly pass it. Bahati said he had been "assured" that the bill would be passed one day.

Uganda's ethics ministers over the years have been noted for strong anti-gay stances, but gay activists and even some government officials say Lokodo, a former Catholic priest, had gone too far. He is accused of ordering police to break up two gay conferences this year, and on a talk show he said recently that he had compiled a list of nearly 40 foreign civil society groups he wants expelled for allegedly promoting homosexuality in Uganda.

A government official said Lokodo had been forced to "own" the statement issued on Friday after a meeting in which he was officially asked to tone down anti-gay rhetoric.

"He was going into issues of morality and he was giving unnecessary interviews," the official said of Lokodo. The official was interviewed on condition of anonymity to avoid reprisal for frankly discussing the behind-the-scenes actions.

Lokodo is now the subject of court case brought by lawyers and activists who say he violated the right of Ugandans to assemble when he had police break up a gay meeting in February. This week, Lokodo and the police were accused of disrupting another gay meeting in Kampala, an act condemned by rights groups including Amnesty International.

"We are seeking a declaration that his acts were illegal," said Francis Onyango, the lawyer who filed the case on behalf of Uganda's gay community.

The case against Lokodo is expected to start on Monday.