Top Chinese leaders have a better understanding of America's new focus on the Asia-Pacific region, but they are concerned that there is too much emphasis on China's military build-up rather than economic or diplomatic efforts, U.S. Defense Secretary Leon Panetta said Wednesday.

BEIJING — Top Chinese leaders have a better understanding of America's new focus on the Asia-Pacific region, but they are concerned that there is too much emphasis on China's military build-up rather than economic or diplomatic efforts, U.S. Defense Secretary Leon Panetta said Wednesday.

After two days of meetings with political and military officials, Panetta said he comes away hopeful that the two nations can work together to bolster security in the region.

While it appears Panetta is not leaving China with any tangible agreements, he believed he had assured his hosts that U.S. plans to add troops, ships and a new missile defense site in the region are not meant to threaten China.

"The key for them is that as we develop and strengthen our presence here, that we do it in conjunction with developing a strong U.S.-China relationship," Panetta told reporters shortly after he met with China's future leader, Vice President Xi Jinping. "That gave me a lot of hope that they understand exactly what our whole intention is here."

More broadly, Panetta's time in China was focused on slowly repairing America's long troubled military relationship with China — and opening the door for better communications so that the two nations can avoid misunderstandings.

Still, his visit came as violent protests raged around the country, over a territorial dispute between China and Japan. The U.S. says it will remain neutral in the matter. But protesters slammed America, charging that the increased U.S. activity in the region has emboldened Japan and other countries to challenge China in such disputes.

Panetta spent much of his time explaining the U.S. military's new shift to the Pacific, which has fueled worries of increased tensions or conflict with China and its 2.3 million-member People's Liberation Army. In a speech to Chinese troops Wednesday, he laid out a more pointed argument that the growing American presence in the region includes an effort to build a stronger relationship with Beijing.

"Our rebalance to the Asia-Pacific region is not an attempt to contain China. It is an attempt to engage China and expand its role in the Pacific," Panetta said in a speech to cadets and young officers at the Engineering Academy of PLA Armored Forces. "It is about creating a new model in the relationship of two Pacific powers."

He acknowledged that improving relations and building trust will take time and said, "Despite the distance ... that we have traveled over the past 40 years, it is clear that this journey is not yet complete, particularly for our two militaries."

Tensions between the U.S. and China have reverberated across the region, often focused on America's support of Taiwan, which China regards as a breakaway province. China has threatened to use force to block any Taiwanese bid for formal independence.

The U.S. also has been very vocal in blaming China for cyberattacks that emanate from the country and steal critical data from U.S. government agencies and American companies.

Panetta has stressed that change will take time. But he said he sees real progress towards building a military-to-military relationship with China.

"We will have our differences," Panetta told reporters. "But the key is if we can have open communications and the ability to express views in a candid way... that more than almost anything else can lead to improved relations between the U.S. and China."

Panetta met Wednesday with Xi, who reappeared just days ago after a puzzling two-week disappearance that raised questions about his health.