SEOUL, South Korea (AP) — The leaders of South Korea and Japan agreed to accelerate efforts to mend ties frayed over Japan’s past colonial rule of the Korean Peninsula as they held their countries’ first summit talks in nearly three years on the sidelines of the U.N. General Assembly, both governments announced Thursday.

The meeting occurred after Tokyo denied Seoul’s earlier announcement they had agreed on the summit, in a sign of the delicate nature of their current relations.

During their 30-minute meeting in New York on Wednesday, South Korean President Yoon Suk Yeol and Japanese Prime Minister Fumio Kishida shared the need to improve bilateral ties and agreed to instruct their respective diplomats to step up talks for that, Yoon’s office said in a statement.

Kishida’s office confirmed the hotel meeting. A separate Japanese Foreign Ministry statement said the two leaders agreed to promote cooperation between the two countries as well as with the United States. It said the leaders shared the need to restore sound relations.

Yoon’s office said the two leaders also jointly expressed serious concerns about North Korea’s recent legislation authorizing the preemptive use of nuclear weapons in certain conditions and the North’s reported moves to conduct its first nuclear test in five years. The Japanese Foreign Ministry said Kishida and Yoon agreed to further cooperate in their response to North Korea.

Both South Korean and Japanese governments said Yoon and Kishida agreed to continue communications between them. But it wasn’t immediately known how meaningful conversation the two leaders could have to address major sticking points in bilateral ties that suffered their biggest setback in recent years when the two countries were governed by Yoon and Kishida’s predecessors.

In 2018, South Korea’s top court ruled that two Japanese companies — Nippon Steel and Mitsubishi Heavy Industries — must compensate Koreans who had been forced to work during Japan’s 1910-45 colonial occupation. The companies and the Japanese government have dismissed the rulings, arguing that all compensation issues were already settled under a 1965 treaty that normalized bilateral ties and included Tokyo’s provision of millions of dollars to Seoul in economic assistance and loans.

The dispute prompted the two governments to downgrade each other’s trade status and Seoul to threaten to abandon an intelligence-sharing deal. The former Korean forced laborers and their supporters, for their part, pushed for the forced sales of the Japanese companies’ assets in South Korea.

It’s unclear if Wednesday’s summit would yield progress on the matter since participants in the court cases maintain the Japanese companies must first consent to the South Korean court rulings if they want to resolve the legal disputes.

The strained ties have complicated a U.S. push to bolster its trilateral security alliance with Seoul and Tokyo — two of its key regional allies where it deploys a total of 80,000 troops — to better deal with a rising Chinese influence and North Korean nuclear threats.

South Korea and Japan have been seeking better ties since the May inauguration of Yoon, who publicly calls for improve ties with Tokyo and a strengthened Seoul-Tokyo-Washington security cooperation in the face of a growing North Korean nuclear arsenal.

But when the Yoon’s government last week announced what it called a planned summit between Yoon and Kishida in New York, Tokyo officials responded there had been no agreement to hold that summit.

The Yoon-Kishida meeting was the first summit between the countries since December 2019, when then-South Korean President Moon Jae-in and Japanese Prime Minister Shinzo Abe met in China on the sidelines of a South Korea-Japan-China summit.

__

Associated Press writer Mari Yamaguchi in Tokyo contributed to this report.