TOKYO (Reuters) - The commandant of the U.S. Marine Corps said on Wednesday any crack in alliances in Asia that helped counter threats from North Korea and China were a worry as a spat between Japan and South Korea threatened to spill over into intelligence sharing.

"We should all be concerned when any part of an alliance has some challenges," General David Berger said at a media roundtable in Tokyo. "Each country has information that the other will need. I am optimistic it will get worked out."

Washington has found itself in the middle of a worsening spat between its two key Asian allies over compensation for South Koreans forced to work in Japan during World War Two that has already spilled over into trade and threatened to derail security cooperation.

Japan said this month it was removing South Korea from a "white list" of countries that enjoy minimum trade restrictions, citing national security concerns, after earlier tightening curbs on export materials used to make memory chips and display panels.

Seoul has responded by warning it could scrap an intelligence-sharing pact with Japan that is pivotal in dealing with North Korea's nuclear and missile threats.

The General Security of Military Information Agreement, which is due to be automatically renewed on Aug. 24 unless one of the partners objects, eases three-way intelligence gathering with Washington.

"I am confident we share a common view of the threats to the region. The near-term threat is from North Korea and the long- term strategic threat to stability in this region and the world is China," Berger said.

His comments came ahead of a meeting on Wednesday between Japanese Minister of Foreign Affairs Taro Kono and his South Korean counterpart, Kang Kyung-wha, in Beijing on the sidelines of trilateral talks including China.

Berger was on his first overseas trip since the U.S. Senate confirmed his appointment in June. A third of the U.S. Marines fighting strength is based in Japan, from where it can deploy quickly to potential trouble spots in Asia.

Berger, who travels to South Korea on Thursday, met Japanese defense officials on Tuesday to discuss cooperation, including the possibility of using Japanese carriers to refuel and rearm U.S. Marines F-35B stealth fighters.