Photo/Illutration South Korean President Moon Jae-in, center right, talks with Japanese Prime Minister Shinzo Abe, center left, ahead of the ASEAN+3 Summit in Nonthaburi, Thailand, on Nov. 4. (South Korea Presidential Blue House via AP)

SEOUL--A senior U.S. official said Wednesday an unexpected meeting this week between the leaders of South Korea and Japan was an "encouraging sign" that the Asian U.S. allies are on track to improve a relationship strained by deep rows over trade and history.

David Stilwell, U.S. assistant secretary of state for East Asia and the Pacific, spoke while visiting South Korea weeks before the expiration of a military intelligence-sharing agreement between Seoul and Tokyo. The Trump administration has been pressuring its allies to keep the deal, which symbolized the countries' trilateral security cooperation with Washington in face of the North Korean nuclear threat and China's growing influence.

South Korean President Moon Jae-in on Monday initiated an unscheduled 11-minute meeting with Japanese Prime Minister Shinzo Abe on the sidelines of a regional forum in Thailand, the latest step taken by Seoul to deescalate the feud with the deadline on the military agreement approaching.

"President Moon and Prime Minister Abe had the opportunity to talk and that's an encouraging sign as we watched the relationship improve," Stilwell told reporters after a meeting with South Korean Prime Minister Kang Kyung-hwa.

Seoul and Tokyo in past months have seen their relations sink to a low unseen in decades.

Japan has denounced South Korean court rulings calling for Japanese companies to offer reparations to aging South Korean plaintiffs for their World War II labor, insisting that all compensation matters were settled when the two countries normalized relations under a 1965 treaty.

South Korea accused Tokyo of ignoring the suffering of South Koreans under Japan's brutal colonial rule of Korea from 1910 to 1945 and furiously reacted to Japanese moves to tighten controls on key technology exports to the country and downgrade its trade status.

The dispute spilled over to security issues with Seoul saying it plans to terminate the military agreement with Tokyo. Following an angry reaction from the Trump administration, Seoul said it could reconsider its decision to end the military agreement if Japan relists South Korea as a favored trade partner. The pact will expire in late November.

Monday's meeting between Moon and Abe was their first since they held a summit on the sidelines of the U.N. General Assembly in September 2018.