Ugandan officials have banned a prominent LGBT rights group in a major setback for the community there.

Sexual Minorities Uganda (Smug) has been ordered to shut down with "immediate effect" for not registering properly with authorities.

The campaign group decried the order as a "clear witch hunt" by the government against LGBT Ugandans.

Sexual minorities face widespread persecution in Uganda, where anti-gay and transphobic views are common.

Gay relationships are illegal in Uganda, where they can be punished by up to life in prison for committing "unnatural offences."

Official police data shows that 194 people were charged with the offence between 2017 and 2020, including 25 who went on to be convicted.

"This is a clear witch hunt rooted in systematic homophobia, fuelled by anti-gay and anti-gender movements," said Smug's director Frank Mugisha, who is a gay Ugandan activist.

He accused authorities of treating members of Uganda's LGBT minority as second-class citizens and trying to erase their existence completely.

On Friday Ugandan officials announced they were halting Smug's operations because the campaign group, founded in 2004, had failed to register its name with the National Bureau for Non-Governmental Organizations (NGOs) properly.

It is the same reason given last year when dozens of civil society groups - including pro-democracy organisations - were also banned by Ugandan authorities.

This time officials say that the issue stems from Smug's name itself - Sexual Minorities Uganda.

In a statement, the NGO Bureau acknowledged that Smug had attempted to register with authorities in 2012, but that the application had been rejected because Smug's full name was considered "undesirable."

President Yoweri Museveni, who has been in office since 1986, has made homophobic comments in the past - including in a 2016 CNN interview when he called gay people "disgusting."

Although there are no laws specifically criminalising being transgender in Uganda, trans people are regularly prosecuted for other offences including "personation" (false representation), according to reports compiled by rights organisations.

Since its establishment almost two decades ago, Smug has campaigned for the rights of LGBT people in Uganda by promoting access to health services and supporting members of the LGBT community to live openly.

It has also taken legal action to protect gay people from hostility, including in 2010 when it successfully petitioned a Ugandan judge to order a newspaper to stop publishing the names and photographs of gay Ugandan men under the headline "hang them".

The group said several of its members had been attacked or harassed as a result of the article - including one woman who was almost killed when her neighbours began throwing stones at her house.

At the time, Ugandan politicians were preparing to debate whether or not to introduce the death penalty for same-sex relationships - a legislative amendment that attracted widespread international condemnation before eventually being dropped.

More recently, Smug has vocally criticised anti-gay speeches delivered by Ugandan politicians - including in the run-up to national elections in 2021.

"The politicians are using the LGBT community as a scapegoat to gain support and win votes and it is fuelling homophobia," Smug's director Frank Mugisha told the Thomson Reuters Foundation.