(Bloomberg) -- Uganda’s President Yoweri Museveni signed into law legislation with harsher penalties for LGBTQ people, including death and life-imprisonment sentences.

The president “has assented” to the bill, which now becomes law, his office announced in a post on its Twitter account.

Lawmakers approved an amended bill on May 2, seeking the most-punitive penalties for aggravated homosexuality or violations such as same-sex intercourse with persons under the age of 18 and if an offender is HIV positive. 

Parliament had approved an earlier version of the bill in March, but Museveni returned it to lawmakers to consider changes he proposed. The new document removed provisions that sought to punish people for merely identifying as LGBTQ.

Museveni signed the new law more than eight years after a version of it was quashed by the nation’s court for procedural flaws. As in 2014, the legislation can still be challenged in court.

LGBTQ rights have come under increased pressure lately, with the Indian government opposing giving legal recognition for same-sex marriages amid a Supreme Court hearing on the matter. In Kenya, President William Ruto bashed a pro-LGBTQ ruling by the nation’s top court, while Ghanaian lawmakers are considering acutely punitive legislation.

©2023 Bloomberg L.P.