A court in Japan has ruled the prohibition of same-sex marriages "unconstitutional."

The ruling might lead to the eventual recognition of same-sex partnerships.

Japan is the only country in the Group of Seven that doesn't recognize same-sex unions. The ruling by a district court is considered to be significant for the lesbian, gay, bisexual and transgender community.

"Sexual orientation cannot be changed or selected by a person's will. It is discriminatory treatment ... that they cannot receive even some of the legal benefits that heterosexuals do," the ruling read.

The ruling was made by the Sapporo District Court in a case filed by a group of lesbian, gay, bisexual and transgender plaintiffs against the government. Similar cases are currently being heard in other courts.

Lesbian, gay, bisexual and transgender activists said the ruling is a symbolic victory. It was described by some as "revolutionary" and "life-changing."

"Its value is absolutely measureless. Until the ruling was announced, we didn't know this was what we'd get and I'm just overjoyed," the director of activist group Marriage for All Japan and representative of Pride House Tokyo, Gon Matsunaka, said.

A law will have to be passed to make same-sex marriages legal in Japan. Analysts said passing a law would likely take time given the socially conservative nature of Japan.

The community in the country has remained largely invisible with same-sex couples having limited rights. Under existing laws, same-sex couples can't legally inherit their partner's assets and they have no parental rights.

Some municipalities have agreed to issue partnership certificates to some couples to allow them to rent apartments. However, the certificates don't give same-sex couples the same legal rights as heterosexuals.