"We become legal again!" said LGBT activist Frank Mugisha. But Ugandan LGBT activists are bracing for a violent backlash to the decision.

ISAAC KASAMANI/AFP / Getty Images Anti-LGBT activist Martin Ssempa (right) in Constitutional Court on July 30, with his son (center).

Uganda's Constitutional Court struck down the country's Anti-Homosexuality Act on Friday, giving new hope to the country's embattled LGBT people and human rights activists.

Kasha Jacqueline, one of the activists who brought the petition, tweeted her delight at the news: FINAL JUDGEMENT: Iam nolonger http://t.co/ekOD5G8eQO we have made history for generations to come.speak OUT now. #AHA scraped.EXCRUCIATING. Kasha Jacqueline@KashaJacquelineFollow FINAL JUDGEMENT: Iam nolonger http://t.co/ekOD5G8eQO we have made history for generations to come.speak OUT now. #AHA scraped.EXCRUCIATING. 11:14 AM - 01 Aug 14ReplyFavorite

In the five months since Uganda adopted the law, which imposes a sentence of up to life in prison for homosexuality and criminalizes advocating LGBT rights, LGBT Ugandans have lived under the constant threat of arrest or mob violence. The court's decision paves the way for organizations to again begin operating openly and to allow LGBT people to resume normal lives. But that change will come slowly — homosexuality remains a crime in Uganda under a provision of the penal code on the books before the Anti-Homosexuality Act was passed last December, and there is a chance of a surge in anti-LGBT violence in reaction to today's ruling. The decision could also significantly ease international pressure on President Yoweri Museveni, who has been under pressure from the United States, the World Bank, and other important donors to get rid of the law or at least substantially weaken it through enforcement.

Ugandan journalist Andrew Mwenda tweeted from the packed courtroom: The retrogressive anti homosexuality act of Uganda has been struck down by the constitutional court - it's now dead as a door nail. Andrew M. Mwenda@AndrewMwendaFollow The retrogressive anti homosexuality act of Uganda has been struck down by the constitutional court - it's now dead as a door nail. 6:16 AM - 01 Aug 14ReplyFavorite

The courtroom became something of a circus during the three-hour recess the judges called before issuing the ruling, according to people in the room. Anti-LGBT activist Pastor Martin Ssempa prayed loudly and got into arguments with multiple petitioners. Security eventually approached Ssempa to request he sit down. The court struck down the law on procedural grounds, saying it was invalid because there was no quorum in Parliament when the legislation was passed on Dec. 20. (A quorum is the requirement that at least one-third of members are present when a vote is held.) The court was ruling on a petition brought by a group of 10 human rights activists, legal scholars, and opposition politicians. The court did not rule on the underlying question of whether anti-LGBT laws violate basic human rights, and so the pre-existing sodomy code, which was imposed when Uganda was a British colony, remains in place. Two men are currently awaiting trial under this provision. Since the vote last year, there has been a 20-fold increase in incidents of anti-LGBT harassment, including blackmail, eviction, and torture, according to a study by Sexual Minorities Uganda. The country's largest human rights organization, the Refugee Law Project, has also had many of its activities shut down by the government, which alleges it was involved in "promoting homosexuality." With the court's nullification of the law, "we become legal again," said Sexual Minorities Uganda Director Frank Mugisha, one of the petitioners. But this ruling won't make life better for LGBT people right away, he said. "Society won't give in," though there is "an open space and a [chance for] dialogue with the government" now that the law is gone. Mugisha and other LGBT activists said before the ruling they were braced for a surge in violence. The law's supporters, like Ssempa and the leadership of the Inter-Religious Council of Uganda, had been whipping up their supporters during the two days of hearings before the ruling, and LGBT activists expected a backlash if they won. "Many people are going to retaliate and attack community members," said Kasha Jacqueline of the organization Freedom and Roam Uganda, another of the petitioners. "People are going to retaliate — not just the members of Parliament and anti-gay groups and religious leaders, but in the community as well." By dismissing the law on procedural grounds, the Constitutional Court sidestepped ruling on the question of whether LGBT rights are protected by fundamental rights protected by the Ugandan constitution. It also does nothing to stop Parliament from passing the law again with a quorum present.

Ssempa told BuzzFeed outside the courtroom that he suspected the court had been corrupted, and would demand an appeal of the ruling to the Supreme Court and an investigation by Parliament into the independence of the judiciary. "This decision is a legal travesty. It is an insult to all family-culture-loving people in Uganda," Ssempa said. "Is there possibility that the president traveling to Washington next week could be the reason why this case was hurried at lightning speed? ... We just wonder if indeed our country is independent, and we want to ask the parliament to investigate the independence of the judiciary."

Listen to Martin Ssempa's full remarks on the ruling. View this track on SoundCloud w.soundcloud.com / Via via Mujuni Raymond

In a press conference Friday afternoon, the bill's sponsor, MP David Bahati, expressed confidence that the attorney general will appeal the ruling. "Our competent legal team will continue to petition the Supreme Court and I believe we will win," Bahati said. "The court case ruling is no victory at all, the morals of the people of Uganda will prevail." Bahati also could try to get another vote on the bill in Parliament with a quorum present. But the law's opponents think the chances he'll succeed are slim. Re-passing the law would require starting the legislative process from the beginning, including committee hearings and receiving certification of its financial impact from the finance ministry. If the government of President Yoweri Museveni does not want the bill to pass again, the finance ministry could silently kill the bill simply by withholding certification. "Someone will try," said Nicholas Opiyo, one of the attorneys who argued against the law before the Constitutional Court. "I don't think it will come back immediately. It will take some time. But the dynamics here change quite rapidly and it might not come back at all." The speed with which the court moved to reach a ruling had many speculating that it was acting on orders from Museveni to dispose of the legislation. The court wasn't scheduled to take up the challenge to the law until September, but then abruptly announced last week that it would begin hearings this Wednesday. It began hearing arguments despite the objections of the representative of the attorney general, Patricia Mutesi, who may still appeal the order to proceed to the Supreme Court. But if political pressure had been put on the court to strike down the law, the same pressure could likely be used to get the attorney general's office to quietly drop its efforts to uphold the law.

This is the third important ruling from the Ugandan judiciary in support of LGBT rights, and it could reverberate throughout the region, where several other countries are considering similar laws. It shows that courts are willing to support LGBT rights even in east African countries where politicians have concluded being anti-LGBT is good politics. It also comes shortly after a Kenyan court ordered government officials to allow a trans rights group to officially register their organization. Other LGBT rights cases are pending in Kenya, as well as in Malawi and Botswana. The law's defeat could quickly unlock important funding streams for the Ugandan government, which relies heavily on foreign aid. The health ministry had made a concession to the World Bank in June in an attempt to get access to a $90 million health care loan that had been on hold since Museveni signed the Anti-Homosexuality Act in February, releasing guidelines that attempted to ensure LGBT patients would not be endangered by access to health services. It is not immediately clear how Friday's ruling will affect U.S. sanctions announced in June, which include denying entry to Ugandan officials who have been involved in human rights abuses. Some human rights advocates were already critical that the U.S. immediately undermined that decision by inviting Museveni to participate in an African Leaders Summit being hosted by the Obama administration in D.C. next week. LGBT activists now turn their work to the much harder job of rolling back the colonial-era sodomy law and trying to undo the anti-LGBT sentiment stirred up over the four years that the bill has been under consideration. That will not fade quickly. But, said Kasha Jacqueline, "It's a big step forward if the law is scrapped, because many people are taking the law into their own hands." "If the law is gone, it's easier, then the police are obliged to protect," said Frank Mugisha. But, he said, "the struggle is still long."

Listen to Justice Steven Kavuma give the order striking down the Anti-Homosexuality Act: View this track on SoundCloud w.soundcloud.com / Via Mujuni Raymond