Homosexuality is legal, but widespread stigma has kept most LGBT Koreans in the closet.

South Korea’s Supreme Court has ordered the government to allow an LGBT rights foundation to legally register as a charity, reaffirming respect for LGBT rights in the country, Human Rights Watch reports.

The Beyond the Rainbow Foundation has faced discriminatory rejection from multiple government agencies over the past three years, preventing the group from receiving tax-deductible donations. The Seoul Metropolitan Government, the National Human Rights Commission, and the Ministry of Justice had all previously resisted the charity’s registration, claiming that LGBT rights were not within their purview.

Park Yeong-Dae/AFP/Getty Images

“This judgment is a victory for the fundamental rights of all South Koreans—and a boost to the LGBT community’s ability to organize and advocate,” says HRW’s Graeme Reid. “It should never have been necessary for an LGBT group to lobby to find a government agency to consider their application for registration.”

Beyond the Rainbow, which raises funds to support the LGBT rights movement in South Korea, also documents anti-LGBT discrimination and works to make civic space safer for LGBT people and their families.

AFP/Getty Images

Homosexuality is not illegal in South Korea, but its LGBT community still faces widespread stigma, and most queer South Koreans remain closeted, even to friends and family. Kim Jho and actor-politician Hong Seok-cheon are two of the only out celebrities in the country, and homosexual activity among male soldiers is punishable by up to two years in prison.

Korean Human Rights Committee Law states that “no individual is to be discriminated against on the basis of his or her sexual orientation.” However, President Moon Jae-in has said that he does not approve of homosexuality and would not endorse an inclusive anti-discrimination bill that prohibits hate speech and crimes against women, LGBT people, and those with disabilities.

Jung Yeon-Je_AFP/Getty Images

Last May, a court ruled against the first same-sex couple suing for the right to marry. Samsung and Google Play have been forced to block gay dating apps in the country.

An estimated 85,000 people took to the streets of Seoul last month for Korea’s Pride parade, the largest in the event’s 17-year history. Korea Queer Cultural Festival organizers had to go to court in 2015 to overturn a police ban on the annual march.