TOKYO (AP) -- The top U.S. military officer told American troops based in Japan on Thursday that "the best way to avoid war is to prepare for it."
Gen. Martin Dempsey, chairman of the joint chiefs of staff, made the comments at Yokota air base amid heightened tensions in the region after repeated threats from North Korea.
In response, the U.S. has deployed an anti-ballistic missile battery to Guam, while the Japanese government has deployed Aegis cruisers and land-based missile interceptors around Tokyo.
While there has been a lull in rising hostility between the two Koreas the past few days, prospects for dialogue were dim after North Korea demanded the lifting of U.N. sanctions and the end of U.S.-South Korea military drills as conditions for resuming long-suspended talks aimed at defusing tensions on the Korean Peninsula.
But Dempsey said the U.S. would continue military exercises with its allies.
"We'll continue to do whatever exercises we need to do to make sure we have the right command and control, the right skills, the right collaboration, interoperability with our allies in the region in the event that there is a miscalculation," he told the military personnel during the visit, his first to Japan since he assumed his post in 2011.
Responding to a question about a dispute between Japan and China over a cluster of islands in the East China Sea, Dempsey reaffirmed that Washington would live up to its treaty commitments to Japan. Under a joint security pact, the U.S. has nearly 50,000 troops in Japan and is obligated to defend Japanese territory.
"Would we trade off our relationship with Japan in order to have a stronger relationship with China? The answer is no," Dempsey said. But he added: "That doesn't mean we don't take the position of not influencing, not seeking to influence the outcome of territorial issues" toward a peaceful resolution.
Dempsey's visit came after a trip to Beijing, where he held meetings with Chinese President Xi Jinping as well as China's Chief of the General Staff, Gen. Fang Fenghui, and Defense Minister Chang Wangquan.
Issues on the Korean Peninsula featured prominently in those meetings, and Dempsey also called on Beijing to be more transparent about cyberattacks and boost collaboration with the U.S. to tackle a common threat to their economies.
While distrust lingers on both sides, efforts to expand cooperation between the Chinese and U.S. militaries have gained momentum in recent months, and new anti-piracy and humanitarian relief drills are planned.
Dempsey said he hoped to build a better relationship going forward.
"This won't be a straight line, but I assured them that we want there to be a better relationship between our militaries because the world needs us to have a better relationship," he said.
During his time in Japan, Dempsey is scheduled to meet with his Japanese counterpart, Gen. Shigeru Iwasaki, at the Defense Ministry headquarters in Tokyo.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.