Three same-sex couples - two male, one female - had filed the case in the Osaka district court, only the second to be heard on the issue in Japan. In addition to rejecting their claim that being unable to marry was unconstitutional, the court also threw out their demands for 1 million yen ($7,414) in damages for each couple.
"This is awful, just awful," an unidentified female plaintiff said outside the courthouse in footage shown on public broadcaster NHK after the ruling, her voice cracking. It wasn't immediately clear whether the plaintiffs planned to appeal.
The ruling dashes activists' hopes of raising pressure on Japan's government to address the issue after a Sapporo court in March 2021 decided in favour of a claim that not allowing same-sex marriage was unconstitutional.
The ruling triggered a surge of comment in social media in the country, where public support for same-sex marriage has been increasing in opinion polls.
"Unbelievable," tweeted one lawyer working on third case on the issue being heard in Tokyo, with a verdict due later this year.
Japan's constitution defines marriage as being based on "the mutual consent of both sexes". But the introduction of partnership rights for same-sex couples in the capital of Tokyo last week, along with rising support in polls, had increased activists' and lawyers' hopes for the Osaka case.
Japanese law is considered relatively liberal in some areas by Asian standards, but across the continent only Taiwan has legalised same-sex marriage so far.
Under the current rules in Japan, same-sex couples are not allowed to legally marry, can't inherit their partner's assets - such as the house they may have shared - and also have no parental rights over their partner's children.
Though partnership certificates issued by some individual municipalities help same-sex couples to rent a place together and have hospital visitation rights, they don't give them the full legal rights enjoyed by heterosexual couples.
Last week the Tokyo prefectural government passed a bill to recognise same-sex partnership agreements - meaning more than half Japan's population is now covered by such agreements.
While Japanese Prime Minister Fumio Kishida has said the issue needs to be "carefully considered", his ruling Liberal Democratic Party (LDP) has not disclosed any plans to review the matter or propose legislation, though some senior LDP figures do favour reform.
The upcoming case in Tokyo means public debate on the issue will continue, particularly in the capital where an opinion poll by the Tokyo government late last year found roughly 70% were in favour of same-sex marriage.
Legalising same-sex marriage would have far-reaching implications both socially and economically, activists say, by making it easier for companies to attract and retain talented workers, and even help lure foreign firms to the world's third-biggest economy.
"If Japan wants to once again take a leading position in Asia, it has a really good opportunity right now," said Masa Yanagisawa, head of Prime Services at Goldman Sachs and a board member of activist group "Marriage for all Japan," speaking prior to the Osaka verdict.
"International firms are reviewing their Asian strategy and LGBTQ inclusivity is becoming a topic ... International businesses don't want to invest in a location that isn't LGBTQ-friendly."