Uganda's harsh anti-gay law approved by lawmakers in December has been struck down.

According to the BBC, a 5-judge panel of Uganda's Constitutional Court ruled the legislation invalid because it was approved during a parliamentary session that lacked a quorum.

“The speaker was obliged to ensure that there was a quorum,” the court said. “We come to the conclusion that she acted illegally.”

A group of gay rights activists and politicians filed the challenge in March, a month after Uganda President Yoweri Museveni signed the measure, which calls for life imprisonment for the crime of “aggravated homosexuality.” The law also bans the “promotion of homosexuality.”

Nicholas Opiyo, a Ugandan lawyer who joined in petitioning the court, called the victory bittersweet since the law was struck down on a technicality.

“The ideal situation would have been to deal with the other issues of the law, to sort out this thing once and for all,” he told the AP.

A colonial-era law criminalizing gay sex remains on the books.