Remnants of Japan's 1910 - 45 colonial rule of the Korean peninsula remain contentious for both sides, with many surviving "comfort women" - a Japanese euphemism for the sex abuse victims - demanding Tokyo's formal apology and compensation.
Diplomatic tension flared in January when another judge at the Seoul Central District Court ruled in favour of other women in a separate case, ordering Japan to pay compensation for the first time.
That verdict had drawn a rebuke from Tokyo which says the issue was settled under a 1965 treaty and a 2015 deal.
But on Wednesday a judge at the same court recognised Japan's right to state immunity from overseas lawsuits, contradicting the January ruling that Japan could not assert immunity for "a crime against humanity."
"If an exception on state immunity is acknowledged, a diplomatic clash would be inevitable during the process of forcing the ruling's implementation," judge Min Seong-cheol said, dismissing the latest case brought by the 20 "comfort women" victims and their relatives.
Japan's Chief Cabinet Secretary Katsunobu Kato said the latest verdict was "different" from the earlier ruling but declined to elaborate citing the need for closer examination.
"That January ruling was clearly against both international law and bilateral agreements, and as such was extremely regrettable and unacceptable," he told a briefing.
Lee Yong-soo, a "comfort women" victim and one of the plaintiffs, called the ruling "absurd, nonsense," saying she would seek international litigation over the case.
Justice Min also said the issue should be resolved via diplomatic consultations, and the 2015 agreement could provide the groundwork for a solution despite some flaws in negotiations.
Under that deal, Tokyo issued an official apology and provided one billion yen (S$12.3 million) to a fund to help comfort women victims, with both sides promising to "irreversibly" end the dispute.
But some victims, including Lee, had rejected the settlement saying the government did not sufficiently consult them during the negotiations.