Japan is in talks with South Korea for President Moon Jae In to attend the opening ceremony of the Tokyo Olympics next month, diplomatic sources said Tuesday, amid escalating tensions between the two neighboring countries over wartime history.

But Tokyo is reluctant to hold a summit between Prime Minister Yoshihide Suga and Moon if the president makes a visit for the July 23 ceremony, the sources said. Moon last visited Japan in June 2019 to attend the Group of 20 summit held in Osaka.

South Korea conveyed to Japan earlier this month that Moon is considering attending the ceremony, according to the sources. Seoul has said the visit would be in return for former Japanese Prime Minister Shinzo Abe's trip to South Korea in 2018 for the Pyeongchang Winter Olympics.

South Korea hopes to use Moon's attendance as an opportunity for dialogue between the two countries' leaders, one of its officials said.

Japan has "no reason to deny (Moon's) attendance at the opening ceremony," a senior Japanese Foreign Ministry official said.

But the Japanese government remains reluctant to hold a summit if Moon visits Tokyo, the sources said.

Japan-South Korea relations have sunk to their lowest point in decades following South Korean Supreme Court rulings in 2018 that ordered Japanese companies to compensate plaintiffs who were laborers during Japan's 1910-1945 colonial rule of the Korean Peninsula.

They worsened in January when the Seoul Central District Court ordered the Japanese government to pay damages over the treatment of "comfort women" at military brothels.

Japan has said South Korea should take appropriate action over the issues, taking the stance that all claims related to its colonial rule were settled "completely and finally" under a 1965 bilateral agreement.

South Korea has said it would be impossible to resolve the issues unless Japan makes an accurate accounting of history.