A Ugandan court has sentenced a man to 30 years in jail for the brutal slaying of a leading gay rights activist, even as a controversial anti-gay bill is again brought before Uganda\'s parliament. Enoch Nsubuga, 22, admitted beating prominent campaigner David Kato, 46, 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,\" Jane Okuo Kajuga, a spokeswoman for the Directorate of Public Prosecutions, told AFP. Kato\'s twin brother John Mulumba Wasswa told AFP 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 judgement 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. 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 lawmakers 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. It brings in the death penalty for anyone caught engaging in homosexual acts for the second time as well as for gay sex where one partner is a minor or has HIV. It also proposes to criminalise public discussion of homosexuality and would penalise an individual who knowingly rents property to a homosexual. It essentially requires anyone who knows of or has heard of any homosexual activity to report it to the police within 24 hours. Human rights activists say that clause would violate the confidentiality required of doctors, priests and counsellors. Gay rights activists have blamed an increase in homophobia in Uganda on evangelical preachers, some of whom are close to the regime of President Yoweri Museveni. Ugandan lawmakers failed to debate the bill during the last session of parliament, which ended in May, leading gay rights campaigners to believe that the proposed legislation had effectively been killed off. But parliament voted in October last week to hand over any legislation that was not debated last time round to the new session, paving the way for a debate on the contentious bill. \"Parliament passed a resolution to save the bills that were not debated in the last session, including the anti-homosexuality bill. It will be debated,\" David Bahati, the ruling party MP behind the legislation, told AFP in early November. 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 $526 million (385 million euros) in development aid from the United States last year. British Prime Minister David Cameron said recently that Britain would consider withholding aid to countries that do not recognise gay rights. Britain is one of the biggest donors to Uganda.