Ugandan anti-gay activists led by pastor Martin Ssempa (center) speak to the press in Kampala on August 1, 2014.
CNN  — 

Uganda’s Constitutional Court on Friday struck down a new law that made some homosexual acts punishable by life in prison, asserting that legislative technicalities weren’t properly observed when it passed, a government spokesman said.

The law, which Parliament passed in December and President Yoweri Museveni signed in February, was struck down “because it was passed without the required quorum in Parliament,” government spokesman Oswono Opondo said.

The law called for life in prison for “aggravated homosexuality.” This includes acts in which one person is infected with HIV, “serial offenders” and sex with minors, according to Amnesty International.

It also allowed the imprisonment of those who counsel or reach out to gays and lesbians.

READ: U.S. reduces funding to Uganda over harsh anti-gay laws

READ: Ugandan tabloid prints list of ‘homosexuals’

READ: Amanpour blog: Some gay Ugandans would rather die than live under new law