Prime Minister Shinzo Abe and Vietnamese President Tran Dai Quang have affirmed their commitment to peacefully resolving disputes in the South China Sea in line with international law, as Japan prepares to provide Hanoi with patrol ships to strengthen its maritime law enforcement capabilities.

Meeting on the sidelines of the Pacific Rim summit in Lima, Abe and Tran agreed to promote their domestic procedures to implement the Trans-Pacific Partnership, a 12-nation free trade agreement, according to Japan’s Foreign Ministry.

Preparations are underway to provide the patrols ships promised to Vietnam in September, Abe told Quang.

Vietnam is among several countries embroiled in territorial disputes with Beijing in the South China Sea.

Abe promised Japan’s full support to Vietnam for its hosting of next year’s summit of the 21-member Asia-Pacific Economic Cooperation forum.

Quang meanwhile praised a planned visit to Vietnam next spring by Emperor Akihito and Empress Michiko.

In separate talks, Abe and U.S. President Barack Obama agreed to continue close bilateral coordination in promoting the TPP and handling other international issues, the ministry said.

Abe and Obama, who will leave office in January, hailed each other’s leadership in strengthening the Japan-U.S. alliance for the peace and prosperity of the Asia-Pacific region.

In a meeting with James Soong, chairman of Taiwan’s People First Party, Abe said he hopes Beijing and Taipei will promote peaceful relations through dialogue, and that stable cross-strait ties will contribute to peace and prosperity in East Asia, according to the ministry.

Abe and Soong agreed to continue developing relations between Japan and Taiwan under the administration of President Tsai Ing-wen launched in May. Tsai’s Democratic Progressive Party has traditionally been skeptical of closer ties with China.

Abe held separate talks with Quang, Obama and Soong on the fringes of the two-day APEC summit that ended Sunday in the Peruvian capital. Soong attended the summit as Tsai’s proxy.