BEIJING -- The defence chiefs of China and the U.S. faced off Tuesday over Beijing's escalating territorial disputes in the region, with U.S. Defence Secretary Chuck Hagel telling his Chinese counterparts they do not have the right to unilaterally establish an air defence zone over disputed islands with no consultation.

And he said America will protect Japan, the Philippines and other allies locked in disputes with China, as laid out in U.S. treaty obligations.

Chinese Defence Minister Chang Wanquan said his country will not take the initiative to stir up troubles with Japan, but warned that Beijing is ready to use its military if needed to safeguard its territory. And he said the U.S. must "stay vigilant" against Japan's actions and "not be permissive and supportive" of Tokyo.

Washington has criticized Beijing's recent declaration of an air defence zone over a large swath of the East China Sea, including disputed remote islands controlled by Japan but also claimed by China. Hagel was in Japan earlier this week, reassuring its leaders of ongoing U.S. support.

In their remarks Tuesday, Hagel and Chang largely aired their countries' well-known positions about the territorial disputes, although doing it for the first time in China, shoulder to shoulder, after nearly two hours of meetings.

"Every nation has a right to establish an air defence zone, but not a right to do it unilaterally with no collaboration, no consultation. That adds to tensions, misunderstandings, and could eventually add to, and eventually get to, dangerous conflict," said Hagel, pointing his finger toward television cameras and photographers at the back of the room, as shutters clicked.

For his part, Chang said China stands ready to resolve the disputes diplomatically. But he made it clear that China is always ready to respond militarily to threats.

Chang also complained that the Philippines illegally occupies part of China's islands and reefs in the South China Sea..

He told Hagel, "We will make no compromise, no concession, no trading, not even a tiny ... violation is allowed."

On a broader scale, the meeting focused on how the U.S. and China can build stronger ties, in the wake of years of frosty relations over Beijing's military buildup, persistent cyber-attacks against U.S. government agencies and private industry, and the aggressive Chinese territorial claims.

Washington says it takes no side on the sovereignty issue of the islands but will defend Japan and the Philippines. But it also has refused to recognize the air defence zone or follow China's demands that its aircraft file flight plans with Beijing's Defence Ministry and heed Chinese instructions.

The Pentagon chief also pressed China on North Korea, saying that Washington and Beijing have a shared interest "in achieving a verifiable, irreversible denuclearization of the Korean Peninsula."

North Korea has been escalating its rhetoric lately, threatening additional missile and nuclear tests and conducting a series of ballistic missile launches.

Later Tuesday, at the People's Liberation Army's National Defence University, Hagel gave a speech to about 120 colonels and other staff officers, and was more direct, challenging China to play a more constructive role in North Korea.

Continuing to support the Pyongyang regime, he said, "will only hurt China's international standing" and it's position in the region.

In the defence university speech, Hagel also pointed to cybersecurity as an area where the U.S. wants the Chinese to be more transparent.

As proof that the U.S. has tried to be more open, he revealed publicly for the first time that the Pentagon gave Chinese government officials a briefing on the doctrine that governs the use of the military's cyber capabilities. And he urged China to do the same.

It has not. And Chang, when asked about the issue, said the PLA abides by the law in its cyber operations and will not pose a threat to others. He added that China "stands ready to deepen the communication with the U.S." on cyber.

The U.S. accuses China's army and China-based hackers of launching attacks on American industrial and military targets, often to steal secrets or intellectual property. China says it faces a major threat from hackers, and the country's military is believed to be among the biggest targets of the NSA and U.S. Cyber Command.

While the disagreements between the U.S. and China were starkly evident during the day's events, there also was an underlying current of slowly growing co-operation.

The two countries interests outweigh their differences, said Chang, adding that "The Pacific is huge enough to hold both China and the U.S."

They also outlined several new agreements.

"Our vision is a future where our militaries can work closely together on a range of challenges, such as humanitarian assistance and disaster relief missions. However, to reach this objective, we must be candid about issues where we disagree," Hagel said.

He said the two countries have agreed to conduct a joint military medical exercise, although no date was set.

And Hagel said that Washington and Beijing will establish formal procedures that will allow their armies to better communicate and also set up an Asia-Pacific Security Dialogue between the assistant defence secretary for the Asia Pacific and China's director of the Ministry of National Defence Foreign Affairs Office, so they also can more easily exchange views.

The United States' campaign to encourage China to be more open about its military growth and intentions got a symbolic boost Monday as Hagel received a rare tour of the country's first aircraft carrier. But efforts to get the Asian giant to be more transparent about cyber attacks and other defence operations have been less successful.