Gay rights activists protest outside Uganda House in Trafalgar Square in London
Gay rights activists protest outside Uganda House in Trafalgar Square in London Reuters

A man who confessed to murdering Ugandan gay activist David Kato has been sentenced to 30 years in prison.

Enock Nsubuga admitted to killing Kato by beating him with a hammer in January. Kato, one of Uganda's most prominent gay rights campaigners, died on his way to the hospital.

He was a school teacher and first came to international recognition after he was featured in an antigay newspaper that published the name of people it identified as gay. A photo of Kato with a headline saying, "Hang them", appeared on the newspaper. The move provoked international outcry.

The activist was reportedly outed by the newspaper following his campaign against a controversial bill which proposed the introduction of the death penalty for homosexuals who are "repeat offenders."

Kato's murder shed light on gay rights issues in Uganda and other African countries with similar tough laws on homosexuality.

Homosexuality is banned in 37 African countries, including Uganda, Zimbabwe, Algeria, Somalia and Liberia, where President Ellen Johnson Sirleaf was recently awarded a Nobel Peace Prize.

Following harsh criticism and pressure from the international community and rights groups, the bill was later on abandoned, but campaigners insist many gay people in Africa are still leaving in fear of being arrested or assaulted.

Ugandan police however issued a statement following the investigation saying that Kato's death wasn't related for his campaign for gay rights. Authorities pointed out that after killing Kato, Nsubuga reportedly stole a camera, keyboard for a computer, T-shirts, shoes and a mobile phone, from a bag belonging to the victim.

However, the ban of homosexuality still remains a contentious issue, and last month British Prime Minister, David Cameron, warned that the UK would reduce aid to countries that still ban homosexuality, to which the Ugandan president Yoweri Musevini retorted by accusing the PM of taking a "bullying mentality" by treating Africans like "children."