SINGAPORE -- Putting a positive spin on a sometimes stormy relationship, U.S. Defense Secretary Robert Gates said Friday that military ties with China are "on a more positive trajectory" but need further strengthening.

Gates told his Chinese counterpart, Gen. Liang Guanglie, that the military relationship needs to catch up with the more mature state of U.S.-China economic and political ties. Liang said he agreed that defense ties are getting better and that they deserve still more attention.

The main elements of friction remain, however. China still claims control of waters the U.S. considers international. Chinese ambition for influence in Southeast Asia and elsewhere still makes smaller nations uneasy, while Beijing dislikes the heavy U.S. naval presence in Asian waters and builds up its military with weaponry only logically intended for use against the U.S.

A new irritant was introduced this week, with allegations that computer hackers in China had compromised the personal Gmail accounts of several hundred people, including U.S. government officials, military personnel and political activists.

The Chinese military tried to direct the spotlight off those allegations Friday, with accusations that the U.S. is launching a global "Internet war" to bring down Arab and other governments.

The FBI said it was investigating Google's allegations, but no official government email accounts have been compromised. Google said all the hacking victims have been notified and their accounts have been secured.

U.S. officials said the Google matter did not arise in Gates' meeting with Liang Friday.

In his remarks at the start of the meeting, Gates said the two governments agree that the military aspect of their overall relationship is "underdeveloped." Some progress toward correcting that imbalance has been made in recent months, Gates said, noting his own visit to Beijing in January and other high-level defense exchanges.

"As I leave office at the end of this month, I believe that our military relationship is on a more positive trajectory," Gates said.

He noted that Navy Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, has accepted an invitation to visit China in July. Last month, Mullen hosted a U.S. visit by his Chinese counterpart, Gen. Chen Bingde.

In response, Liang told Gates that he, too, believes the relationship is improving.

Three senior U.S. officials who attended the meeting told reporters afterward that Liang raised matters of concern to Beijing that they routinely raise in meetings with senior American officials, including U.S. arms sales to Taiwan and U.S. reconnaissance flights off China's coast.

The officials, who spoke on condition of anonymity in order to discuss details of a closed-door meeting, said those matters were not further discussed.

Gates and Liang met on the sidelines of the Shangri-La Dialogue, an annual security talkfest attended by defense officials from across the Asia-Pacific region. On Saturday Gates was delivering an address to the conference before continuing an around-the-world journey that is his final trip before retiring June 30.

A central theme of Gates' message in Singapore is that Asian nations should not believe that impending U.S. defense budget cuts will lead to a smaller or weaker U.S. military presence in Asia. U.S. officials are concerned that some in the region could tilt toward China if they believe they are being abandoned by the U.S. or perceive less-sturdy assurances of American support in the long run.

The main U.S. military presence in Asia is in Japan and South Korea, but Washington also has close military ties to the Philippines, Thailand, Taiwan, Australia and Singapore. The Pentagon is in the midst of an internal review of its force alignment in the region, with the outcome expected to call for a wider range of military exchanges, exercises and ship, aircraft and troop rotations in Southeast Asia as well as with Australia.

How that is achieved will depend to a large degree on how deeply the Pentagon cuts its budget in coming years.

President Barack Obama on April 13 announced a plan to reduce defense spending by $400 billion over the next 12 years, and some in Congress -- as well as some independent analysts -- are calling for far deeper reductions. With an end in sight for the wars in Iraq and Afghanistan, defense savings are central to a broader effort to shrink government deficits.

Gates has made relations with China a priority during his 4 1/2 years as defense secretary, recognizing its increasing economic strength and a military modernization program that is proceeding apace even as the U.S. faces budget constraints.

While there is anxiety in Asia about China's growing influence, some in the region worry also that U.S.-Chinese competition for allies could be problematic.

Malaysian Prime Minister Najib Razak told the Singapore conference's opening session Friday night that he worried about international rivalries.

"Today, China is our partner," he said, according to remarks prepared for delivery and provided by his office. "The U.S. is also our partner. It is not about taking sides."

Gates also met separately Friday with his counterparts from Japan and Singapore.