A ban on same-sex marriages in Japan has been deemed unconstitutional by a court in the country's north.

The ruling is seen as a significant step in the only Group of Seven country to not legally allow such unions.

Even though the court dismissed the plaintiffs' demand for government compensation, the precedent is a major victory for same-sex people and could affect similar lawsuits pending around the country.

The Sapporo District Court said sexuality, like race and gender, is not a matter of individual preference, therefore prohibiting same-sex couples from receiving benefits given to heterosexual couples cannot be justified.

"Legal benefits stemming from marriages should equally benefit both homosexuals and heterosexuals", a copy of the summary of the ruling stated.

Under Japanese law, marriage should be based on "the mutual consent of both sexes", which is currently interpreted as allowing marriage only between a man and a woman.

While awareness and support for LGBTQ people is rising in Japan, discrimination persists.

Same-sex couples cannot inherit their partner's houses, property and other assets, or have parental rights to any children.

More municipalities have enacted "partnership" ordinances so same-sex couples can more easily rent apartments, but they are not legally binding.

In a society where pressure for conformity is strong, many gay people hide their sexuality, fearing prejudice at home, school or work. Transgender people also have difficulty in a society where gender identity is highly specific.

Japan's refusal to issue spouse visas to partners of same-sex couples legally married overseas has been a growing problem, forcing them to temporarily live separately.

The American Chamber of Commerce in Japan last year urged the country to legalise same-sex marriages, saying talented LGBTQ people would choose to work elsewhere, making the country less competitive internationally.