Kato was killed after a newspaper published his picture alongside a headline demanding that homosexuals be hanged

A Ugandan court has sentenced a man to 30 years in jail for the brutal slaying of David Kato, 46, a leading gay rights activist.

Enoch Nsubuga, 22, admitted beating Kato to death with a hammer at his home outside Kampala in January, but claimed that he had been reacting to unwanted demands for sex.

"He was convicted and on Thursday given 30 years in prison," said Jane Okuo Kajuga, a spokeswoman for the Directorate of Public Prosecutions.

Kato's twin brother John Mulumba Wasswa told the AFP news agency that he welcomed the sentence and was convinced that Nsubuga was guilty of his brother's murder.

"It was obvious that he was responsible ... I did not expect anything else to happen," Wasswa said.

Wasswa said the family was still studying the court's judgment before giving a fuller reaction.

John Francis Onyango, a lawyer for Kato's family, said the verdict had come as a surprise as the court had not announced it would be sentencing Nsubuga.

Controversial bill

Kato's killing drew worldwide condemnation, coming after a newspaper in Kampala had published a picture of Kato alongside a headline demanding that homosexuals be hanged.

A controversial bill that calls for the death penalty for certain homosexual acts was recently re-introduced in the Ugandan parliament after politicians failed to debate it during the last session of the legislative body.

Homosexuality is already illegal in the east African country and in some circumstances punishable by long jail terms, but the proposed legislation envisions stiffer punishments.

Gay rights activists have blamed evangelical preachers for an increase in homophobia in Uganda, some of whom are close to the government of Yoweri Museveni, the Ugandan president .

Originally tabled in 2009, the anti-gay bill has drawn international condemnation. The US State Department called the bill "odious".

Uganda, an important ally in the fight against Somalia's al Qaeda-linked rebels, received $526m in development aid from the US last year.

British Prime Minister David Cameron said recently that Britain would consider withholding aid to countries that do not recognise gay rights. The UK is one of the biggest donors to Uganda.

Source: Agencies