The U.S. Navy's challenge last week to China's sovereignty claims in the South China Sea was not designed as a military threat, the head of U.S. Pacific military forces said Tuesday in a mostly upbeat speech about prospects for preventing U.S.-China disputes from escalating to conflict.

During a high-level meeting of military officials from the two nations later Tuesday in Beijing, a top Chinese general again expressed his country's pique over the U.S. warship sailing past Chinese-built islands, while also expressing hope that the two sides could build further trust.

Speaking at a university in the Chinese capital, Adm. Harry B. Harris Jr. cited a recent statement by U.S. Defense Secretary Ash Carter that the international order "faces challenges from Russia and, in a different way, from China, with its ambiguous maritime claims," including Beijing's claim to nearly all of the South China Sea.

However, Harris said the decision to send the USS Lassen, a guided-missile destroyer, into the South China Sea last week near Subi Reef, within the 12-nautical-mile (22-kilometer) territorial limit claimed by China, was meant to demonstrate the principle of freedom of navigation.

"I truly believe that these routine operations should never be construed as a threat to any nation," Harris said, according to his prepared remarks. "These operations serve to protect the rights, freedoms and lawful uses of the sea and airspace guaranteed to all nations under international law."

China at the time protested the Lassen patrol, calling it a "deliberate provocation," and sent two warships to shadow the U.S. vessel and issue warnings. Although China labeled the action illegal, international law allows warships to transit other countries' territorial seas under the principle of "innocent passage."

Carter was scheduled to meet Tuesday in Kuala Lumpur with his Chinese counterpart, Chang Wanquan, on the sidelines of an Asia defense ministers gathering

At the meeting Tuesday between Harris and Gen. Fang Fenghui, chief of general staff for China's military, Fang said the sailing of the U.S. vessel had cast a shadow on the talks, and reiterated Chinese claims to South China Sea territory since "ancient times."

"Just before your visit, regardless of the solemn representations of the Chinese side, the U.S. sent a naval vessel to cruise near the islands of China's Nansha Islands, which has created a disharmonious atmosphere for our meeting, and this is very regretful," he said in remarks in front of reporters at the Defense Ministry in Beijing.

Fang went on to say that "it is my hope that we can enhance mutual understanding and trust and remove negative effects."

In his speech earlier Tuesday, Harris said the U.S. does not want disagreements to interfere with opportunities for building closer military-to-military ties with China. He cited recent advances, such as a Military Maritime Consultative Agreement on measures to improve safe military operations in the Asia-Pacific.

Harris has been outspoken in his criticisms of China's land reclamation in the South China Sea. In March, he said China is "creating a great wall of sand" that is causing serious concern about militarizing reefs and artificial islands in an area of competing territorial claims by several nations. China and five other governments claim the South China Sea either in part of in whole.

The U.S. does not recognize the man-made features, including Subi Reef, as legitimate islands entitled to territorial seas, and U.S. officials say they plan to patrol near them on a regular basis to enforce that view. China has reclaimed approximately 2,000 acres (809 hectares) of land in the Spratly island chain since last year, and is now adding harbors, housing and airstrips.

Harris spoke Tuesday to Stanford University students studying at Peking University in Beijing. He is in Beijing on his first visit as commander of U.S. Pacific Command, which is responsible for U.S. military operations throughout the Asia-Pacific. International media were not invited to the speech.

In his remarks, the admiral was mostly upbeat in his assessment of prospects for improving relations with China, saying he did not subscribe to the pessimistic view that a conflict was inevitable. While saying that as a military commander he is required to "look through a darker lens and drink through a glass half-empty," he emphasized areas of mutual U.S.-China interest and ways in which the two countries are cooperating.

"I agree with many of my Chinese counterparts who have emphasized cooperation over confrontation," Harris said, according to a copy of his prepared remarks provided to reporters traveling with Defense Secretary Carter in Malaysia.

"I continue to have personal and candid conversations with Chinese military leaders, which is why I'm in China this week," he added.

Harris' remarks reflect in part the Obama administration's emphasis on deepening U.S. economic, diplomatic and military relations across the Asia-Pacific -- a so-called "pivot to the Pacific" after years of wars in Afghanistan and Iraq. U.S. relations with China, however, have been complicated by what the U.S. sees as opaque Chinese military intentions and aggressive moves in the South China Sea.

Although mistrust remains on both sides, engagement is increasing. Along with recent agreements meant to prevent unintended incidents between their ships and planes, the two militaries have ratcheted up exchanges and dialogue at bilateral and multilateral forums.

Last month, a 27-member U.S. Navy delegation toured China's sole aircraft carrier at dock and visited a Chinese navy submarine training academy. That was in return for a weeklong visit by 29 Chinese naval officers to the U.S. in February, the first time China had sent such a large delegation.