TOKYO — China, Japan and South Korea warmed their chilly relations Wednesday, brought together by a common goal: ending North Korea’s nuclear program.

While short on specifics, the show of unity, especially ahead of North Korean leader Kim Jong Un’s expected talks with President Donald Trump, was seen as a major success.

Leaders from the three countries held their first three-way summit in more than two years, demonstrating a spirit of cooperation despite continuing differences over North Korea and other issues.

While short on specifics, the show of unity, especially ahead of North Korean leader Kim Jong Un’s expected talks with President Donald Trump, was seen as a major success.

“It was extremely significant that Japan, China and South Korea reaffirmed the importance of their cooperation ahead of a U.S.-North Korea meeting,” Chief Cabinet Secretary Yoshihide Suga said, praising the outcome of the summit.

The agreements came at the first summit for the Northeast Asian neighbors after a hiatus of more than two years, bringing together Japanese Prime Minister Shinzo Abe, Chinese Premier Li Keqiang and South Korean President Moon Jae-in.

“The three countries will take leadership to achieve peace and prosperity in the Northeast Asia,” Abe told a joint news conference in Tokyo, with Li and Moon standing on both sides, all wearing almost identical blue neckties.

Abe said the three discussed how they can get North Korea to give up its nuclear weapons, but he didn’t provide any details. China and Japan, in particular, have differences over how best to achieve North Korea’s nuclear disarmament.

The meeting comes amid a flurry of developments on the Korean Peninsula. North Korean leader Kim Jong Un met Moon on April 27 and Chinese President Xi Jinping earlier this week, in a surprise visit to the Chinese coastal city of Dalian. U.S. Secretary of State Mike Pompeo flew to Pyongyang, North Korea’s capital, early Wednesday to finalize details of a summit planned between Trump and Kim.

“We must lead the ongoing momentum toward complete denuclearization of the Korean Peninsula and achieve peace and stability in Northeast Asia,” Abe said.

The three countries agreed on promoting regional free trade, another hot-button issue challenging their region in the face of Trump’s America-first trade policy.

Japanese Deputy Chief Cabinet Secretary Yasutoshi Nishimura said the three leaders will work toward two free trade agreements — a pact among themselves and the proposed Regional Comprehensive Economic Partnership with Southeast Asian nations.

READ NEXT: North and South Korea make concessions toward ending hostilities

Trump has threatened all three countries with tariffs in a bid to seek trade concessions from them. His moves have raised fears of a trade war between the U.S. and China.

Li, the No. 2 official in China after President Xi Jinping, said earlier that free trade is a good way to promote a global economic recovery.

“We are willing to work with Japan and South Korea to jointly maintain regional stability and push forward the development of the three countries,” he said before the meeting started.

The leaders also agreed to hold trilateral summits on regular basis and set up a secretariat. The summits, which started in 2008, are supposed to be held annually, but Wednesday’s was the first since November 2015.

Analysts say Japan wants to showcase improved ties and cooperation with China and South Korea so its views will be represented in any negotiations with North Korea.

Abe reiterated Japan’s position that it would normalize ties with North Korea only if the latter took concrete steps toward abandoning its nuclear and missile programs and resolved the issue of Japanese abducted by North Korean agents.

Abe held talks separately with Moon and Li later Wednesday. He stressed the importance of a free and peaceful East China Sea to Li, and proposed to Moon a “future-oriented” Japan-South Korea relationship by overcoming their contentious historical issues stemming from Japan’s wartime actions.

Japan and China also signed an agreement to launch a defense hotline next month aimed at preventing military clashes stemming from their territorial row over East China Sea islands.

Moon left Japan after half a day. After that, Abe will host a dinner and lunch for Li and join him on the northern island of Hokkaido on the final day of his four-day Japan visit.

Japanese Foreign Ministry officials said they want to improve Japan’s strained relations with China, with the eventual goal of realizing a visit by Xi.

While the three Asian neighbors are closely linked economically, anti-Japanese sentiment runs deep in China and South Korea because of territorial and historical disputes dating back to Japan’s colonization of the Korean Peninsula and invasion of China in the first half of the 20th century.