Updated

The defense chiefs of China and the U.S. are facing off over Beijing's escalating territorial disputes in the region, with Defense Secretary Chuck Hagel wagging his finger and telling China it doesn't have the right to unilaterally establish an air defense zone over disputed islands with no consultation.

And he said on Tuesday America will protect Japan in a dispute with China, as laid out in U.S. treaty obligations.

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

The U.S. has criticized Beijing's recent declaration of an air defense zone over a large swath of the East China Sea, including disputed islands controlled by Japan.

In their remarks, the two men 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 here.

"Every nation has a right to establish an air defense 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, poking his figure toward the 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 to threats.

On the issue of territorial sovereignty, Chang said, "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 cyberattacks against U.S. government agencies and private industry, and aggressive Chinese territorial claims in the East China Sea.

Beijing's recent declaration of an air defense zone over a large swath of the East China Sea, including disputed islands controlled by Japan has raised complaints from the U.S., deepening concerns that it could spark a confrontation.

Washington has refused to recognize the zone or follow China's demands that its aircraft file flight plans with Beijing's Defense Ministry and heed Chinese instructions. China has warned of unspecified retaliatory measures against aircraft that do not comply, but has so far taken no action.

He also said the U.S. and China must be more open with each other about their cyber capabilities, saying that greater openness "reduces the risk that misunderstanding and misperception could lead to miscalculation."

Hagel pointed to the ongoing threat from North Korea, which recently threatened additional missile and nuclear tests. And he said the U.S. and China have a shared interest "in achieving a verifiable, irreversible denuclearization of the Korean Peninsula."

In recent weeks the North has conducted a series of rocket and ballistic missile launches that are considered acts of protest against annual ongoing springtime military exercises by Seoul and Washington. North Korea says the exercises are rehearsals for invasion.

"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.

Hagel also said the two countries have agreed to conduct a joint military medical exercise, although not date was set.

And he said they will set up new formal procedures that will allow their armies to better communicate and also set up an Asia-Pacific Security Dialogue between the assistant defense secretary for the Asia Pacific and China's director of the Ministry of National Defense 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 got a rare tour of the country's first aircraft carrier, but efforts to get the Asian giant to be more transparent about cyberattacks and other defense operations has been less successful.

In a speech planned for later Tuesday, Hagel will point to cybersecurity as an area where the U.S. wants the Chinese to be more transparent, said a senior U.S. official, who was not authorized to talk publicly by name about the speech so spoke on condition of anonymity.

Hagel arrived in Beijing after a stop in Japan, where he told reporters that China must be more open about its military buildup and better respect its neighbors — a pointed allusion to the territorial disputes.

During unusually forceful remarks during his stop in Japan, Hagel drew a direct line between Russia's annexation of Ukraine's Crimea region and the ongoing territorial disputes between China, Japan and others over remote islands in the East China Sea.

Calling China a great power, he added that "with this power comes new and wider responsibilities as to how you use that power, how you employ that military power."