Members of Uganda’s LGBT community cheer after the ruling. ISAAC KASAMANI/AFP / Getty Images

U.S. and U.N. officials have welcomed the Ugandan Constitutional Court’s decision to overturn the country’s Anti-Homosexuality Act, following months of international criticism.

“We welcome the Ugandan court’s nullification of the Act,” National Security Council Spokesperson Edward Price told BuzzFeed in an email. “This is an important step in the right direction for the human rights not just of the LGBT community but of all Ugandans.”

Price did not respond to questions about how the Constitutional Court’s ruling would impact U.S. diplomatic relations with Uganda. Earalier this month, the U.S. announced it was putting in place travel bans on top Ugandan officials involved with human rights and corruption, canceling several aviation exercises, and redirecting funds for certain programs involving Uganda’s police force, health ministry, and National Public Health Institute.

United Nations Secretary General Ban Ki Moon in a statement also praised the ruling. He called it “a victory for the rule of law” and urged “further efforts to decriminalize same-sex relationships and address the stigma and discrimination that persist in Uganda against lesbian, gay, bisexual and transgender persons.”

Uganda’s parliament passed the bill late last year and President Yoweri Museveni signed it into law in February. The law imposed a maximum lifetime sentence for homosexuality, and also essentially criminalized LGBT advocacy. Uganda’s court overturned the law Friday based on a procedural error.