The legislation was introduced by opposition lawmaker Asuman Basalirwa, who claims it will protect Ugandan church culture and traditional family values from what he calls "acts that are likely to promote sexual promiscuity in this country."
The law will punish anyone identifying as LGBTQ+ with up to 20 years in prison, with some crimes carrying the death penalty. Same-sex relations were already illegal in Uganda, punishable by life imprisonment.
The new legislation also bans promoting or abetting homosexuality, conspiracy to engage in homosexuality, and targets a range of activities.
The death penalty can be invoked for "aggravated homosexuality," a broad term that includes sex acts committed without consent, against children or people with disabilities, by serial offenders, or involving incest.
Ugandan President Yoweri Museveni, who won re-election earlier this year, has previously referred to homosexuals as "deviants."
Anti-LGBTQ+ sentiment is deeply rooted in Uganda, which introduced an anti-homosexuality bill in 2009 that included the death penalty for gay sex.
The East African nation of Uganda has a deep-seated conservative and religious sentiment against the LGBTQ+ community.
This was highlighted in 2009 when the country introduced an anti-homosexuality bill that prescribed the death penalty for gay sex. In 2014, the bill was amended to replace the death penalty with life imprisonment, but it was eventually invalidated.