Worries about China's military buildup and aggressive diplomacy are bolstering its neighbors' desire to see Washington stay committed to the region while pushing them to hedge their bets against waning U.S. influence.

Anxious Asian capitals will be seeking clues to ties between the rival powers when President Barack Obama hosts China's Hu Jintao at a state visit next week where they will strive to put the confrontation of the past year behind them.

Calibrating ties with the United States and China is a delicate dilemma for many in the region, wary of China's intentions but loath to rattle the emerging superpower.

We are trying to strengthen our bargaining position vis a vis China by strengthening ties with the United States, South Korea and Australia. That is not to say to China, 'you are our enemy', but to say 'we are prepared', said Narushige Michishita at the National Graduate Institute for Policy Studies in Tokyo.

We do not want to create a self-fulfilling prophecy by making China into the enemy. We are playing the game very carefully.

In the latest sign of China's military modernization, Beijing confirmed on Tuesday that it had held its first test-flight of a stealth fighter jet, even as U.S. Defense Secretary Robert Gates visited the capital to try to defuse military tension.

China raised regional hackles last year with its tough stance in disputes over islands in the South and East China Seas, fuelling concern even as economic interdependence deepens.

China has undone a lot of the good of its 'smile diplomacy' ... trying to reassure the region that a rising China is not a threatening China, said Jeffrey Kingston, director of Asia studies at Temple University's Japan campus.

Now people are reconsidering that ... In Southeast Asia and Japan, there's a greater sense of appreciation for the U.S.

presence as a counter-balance to China's military power.

Worry about China has convinced Japan of the need to repair an alliance frayed last year by a feud over a U.S. air base as well as efforts by Japan's Democratic Party-led government to forge a diplomatic stance less dependent on key ally Washington.

TRUE DILEMMAS

In a sweeping update of its defense policies, Japan last month pledged tighter security ties with the United States. But the new defense guidelines also called for closer cooperation with regional partners such as South Korea, Australia and India.

The message is clear. The U.S. is declining in relation to the rise of China and the U.S. will not be as credible and reliable a security partner in the long run, Michishita said.

To make up the gap created by the relative decline of the United States, we need more partners.

In a step in that direction, Japan and South Korea agreed this week to upgrade military ties in the face of North Korean hostility. The agreements would mark the first formal military pacts between Seoul and its former colonial ruler, whose relations remain haunted by South Korean memories of the past.

South Korea's military took pains to say the exchanges would be completely unrelated to any move to keep China in check, but analysts said China was definitely on policymakers' minds.

We have to block China's power game for our national security, but we need to cooperate with China economically. It is a true dilemma, wrote Moon Chang-keuk, a columnist at South Korea's JoongAng Ilbo newspaper.

Australia has bolstered three-way dialogue with the United States and Japan and is keen to see a firm U.S. presence.

Australia has made it clear that it would be very uncomfortable with a future Asia dominated by China, and Canberra is very keen for the U.S. to maintain a very strong presence in Asia, said Rory Medcalf at Australia's Lowy Institute for International Policy.

China's hawkish stance in maritime rows has also nudged Indonesia to look to the United States as a counterweight to China, even as Southeast Asia's biggest power seeks good ties with Beijing. Some analysts said Jakarta could leverage Sino-U.S. rivalry to its own advantage.

Both the U.S. and China will increasingly see Indonesia as a player to be courted. And we are already seeing this happening, said Yang Razaki Kassim at Nanyang Technological University in Singapore.

India also has a delicate balancing act. Its ties with China are plagued by a long-running border dispute and neither a visit by Chinese Premier Wen Jiabao last month nor flourishing trade ties have soothed Indian anxiety.

Policymakers are quite concerned with renewed Chinese assertiveness, said Alka Acharya, a member of India's National Security Advisory board. But India would not want to actively project a policy where it is seen as ganging up with these countries and encircling China.