Uganda's Constitutional Court on Wednesday rejected a bid to overturn its highly contentious Anti-Homosexuality Act - one of the toughest such laws in the world.
Despite international criticism, the court declined to nullify or suspend the law, which imposes severe penalties including death for certain same-sex acts.
However, the court did acknowledge that certain parts were inconsistent with fundamental rights - particularly the right to health, privacy and freedom of religion.
Adopted in May 2023, the legislation has led to increased persecution of LGBTQI+ people in Uganda, a conservative predominantly Christian country in East Africa.
In August last year a 20-year-old man was the first Ugandan to be charged with "aggravated homosexuality".
He was accused of "unlawful sexual intercourse with ... (a) male adult aged 41", an offence punishable by death.
'Violation of rights'
A petition against the law was brought by two law professors from Makerere University in the capital Kampala, by legislators from the ruling party and also human rights activists.
They argued that it violated fundamental rights guaranteed under Uganda's constitution, including freedom from discrimination.
The petitioners also said it contravened Uganda's commitments under international human rights law, including the United Nations convention against torture.
But President Yoweri Museveni's government has struck a defiant tone, with officials accusing the West of trying to pressure Africa into accepting homosexuality.
Following Wednesday's decision, activists vowed to carry on their fight for equality and justice for the LGBTQI+ community in Uganda.