Ugandan President Yoweri Museveni has assented to the controversial anti-homosexuality bill, despite condemnation of Western countries and human rights activists.
The bill was first passed by MPs in March but was returned to the parliament for amendment.
In the new law, the offence of homosexuality is now limited to gay sexual acts. People convicted under this clause face life imprisonment.
The legislation also prescribes death penalty for aggravated offences, in cases of sexual abuse against a minor, a disabled person or where a victim of abuse is infected with a life-long illness.
Members of the public will also be required to report to the authorities any form of homosexual abuse against children or other vulnerable people.
The law initially criminalized identifying as a sexual minority but Mr. Museveni argued that this would have led to the arrest and prosecution of people for just their physical appearance.
This clause was removed when the president returned the bill to the parliament.