Uganda’s president has signed into law tough new anti-gay legislation supported by many in this East African country but widely condemned by rights activists and others abroad.

The version of the bill signed by President Yoweri Museveni doesn’t criminalize those who identify as LGBTQ, a key concern for campaigners who condemned an earlier draft of the legislation as an egregious attack on human rights.

However, the new law still prescribes the death penalty for "aggravated homosexuality," which is defined as cases of sexual relations involving people infected with HIV as well as with minors and other categories of vulnerable people.

Parliamentary Speaker Anita Among said in a statement that the president had "answered the cries of our people" in signing the bill.