TOKYO - Japan's Supreme Court upheld a ruling Friday denying compensation to two Chinese women who were forced to work in military brothels during World War II.

Backing a Tokyo High Court ruling, the Supreme Court said that the women had no right to seek war compensation from Japan because of a 1972 agreement with China, a court spokesman and Japanese media reports said.

The plaintiffs, who filed their suit in 1996, had been seeking compensation from the government, Kyodo reported, without specifying the amount. One of the women died in 1999, and her family took over the suit, it said.

In a similar ruling Friday, the top court overturned a lower court ruling awarding compensation to five Chinese who were forced to work for a Japanese construction company during the war.

That Supreme Court decision also referenced the 1972 Japan-China Joint Communique, in which Beijing abandoned its right to claim war reparations from Japan.

Japanese courts have used the same argument in dozens of lawsuits filed over the years by Asian victims of Japan's wartime atrocities.

Some have acknowledged that the government and Japanese companies broke the law by using forced labor. But they rarely rule in favor of plaintiffs seeking compensation, often citing the expiration of the deadline for filing such claims, which is usually 20 years under Japanese law.

Prime Minister Shinzo Abe recently caused outrage in South Korea and China by saying there was no evidence that Japan's army forced "comfort women" to work in military brothels during World War II. Abe has tried to quell the backlash by apologizing.

Historians estimate up to 200,000 women, mostly Chinese and Korean, were forced into prostitution by Japanese soldiers.

After decades of denial, the Japanese government acknowledged its role in wartime prostitution after another historian, Yoshiaki Yoshimi, discovered documents showing government involvement.

That led to an official -- though carefully worded -- apology in 1993, and the establishment of a nongovernment fund to pay the women limited reparations.

But right-wing politicians, who make up an important part of Abe's base, have renewed efforts to roll back the apology. They contend the women were professional prostitutes paid for their services and say Japanese commanders were not directly responsible for setting up brothels.

Some 40,000 Chinese were taken to Japan in the early 1940s to work as slave laborers, mostly in coal mines and ports, including about 360 at Nishimatsu. Tens of thousands of others from Asian countries also were brought here as wartime slave laborers.