A South Korean court on Wednesday dismissed a case brought by a handful of World War II sex slaves and their families against the Japanese government, saying Tokyo enjoyed "sovereign immunity" over the issue.

The ruling comes after the same court in January ordered Tokyo to compensate a dozen women forced to serve Japanese troops -- euphemistically labelled "comfort women" -- marking the first civilian legal victory against Tokyo in South Korea.

One plaintiff pledged to fight Wednesday's different verdict, which an analyst said would be a "plus" for improving ties between South Korea and Japan, whose disputes have spread to affect trade and security in recent years.

The comfort women question and other issues stemming from Japan's 20th-century colonial rule over Korea has bedevilled their relations, despite a 1965 treaty which declared claims between them and their nationals had been settled.

Tokyo and Seoul are both major US allies, democracies and market economies, but their rift -- which has worsened significantly in recent years -- presents US President Joe Biden with a foreign policy headache as he seeks to build a common front on China and nuclear-armed North Korea.

The Seoul Central District Court dismissed Wednesday's case after "reaching the decision that sovereign immunity must be applied to the Japanese government", a court document seen by AFP said.

The decision was in keeping with previous diplomatic agreements between Seoul and Tokyo and to ensure any additional negotiations were carried out smoothly, it added.

"If sovereign immunity is denied, diplomatic conflict with the accused will be inevitable in the process of sentencing and enforcement," it said.

One plaintiff, a former comfort woman now in her 90s, was shaken by the ruling and left the courtroom before the hearing ended.

The issue of wartime sex slavery has been at the core of frosty ties between Seoul and Tokyo in recent years
The issue of wartime sex slavery has been at the core of frosty ties between Seoul and Tokyo in recent years AFP / Jung Yeon-je

"This is really outrageous," Lee Yong-soo told reporters outside.

"But whether the result is good or bad, I will take the case to the International Court of Justice."

Her lawyer Lee Sang-hui said the plaintiffs and legal team would discuss whether to appeal, adding: "I would like to express my regret once again that the ruling was made contrary to the direction toward guaranteeing individual human rights."

Biden held his first summit with Japanese Prime Minister Yoshihide Suga at the weekend and will meet with South Korean President Moon Jae-in next month.

The court decision could "serve as a pillar for taking relations in the direction for improvement", said Lee Won-deog of Kookmin University.

But while the decision will be welcomed by Japan, the professor said it could heighten South Korean resentment over the comfort women issue.

Mainstream historians say up to 200,000 women, mostly from Korea but also other parts of Asia including China were forced to work in Japanese military brothels during World War II.

The Japanese government denies it is directly responsible for the wartime abuses, maintaining that the victims were recruited by civilians and that the military brothels were commercially operated.