US Marines Gen. Joe Dunford, chairman of the Joint Chiefs of Staff, and his Chinese counterpart, Gen. Fang Fenghui, signed the so-called joint staff dialogue mechanism Tuesday at the headquarters of the People's Liberation Army in Beijing.
According to the US Department of Defense
, the agreement will enable the two militaries "to communicate to reduce the risk of miscalculation."
Such communications are especially crucial now, officials said, "as the region and world are facing the dangers of a nuclear-armed North Korea."
Dunford, who is currently visiting Asia, said the United States and China "have many difficult issues where we will not necessarily have the same perspectives," according to a Defense Department statement.
He added improved military contacts would reduce the chances of "miscalculation."
The two nations have clashed over the disputed waters of the South China Sea -- almost all of which is claimed by Beijing, which has militarized and built up islands and reefs it controls in the region.
Last week, a US destroyer sailed near a man-made island constructed by China
as part of a "freedom of navigation" operation the United States conducted in a challenge to Beijing's territorial claims.
The Chinese Defense Ministry denounced the operation as a "provocation" and said it was "firmly opposed to such flaunting of force and promotion of militarization in the region by the US, which could easily trigger accidents at sea and in the air."
Washington this month called on Beijing to endorse a legally binding code of conduct
over the disputed region, with US Secretary of State Rex Tillerson joining his Australian and Japanese counterparts in promising to "continue to fly, sail and operate wherever international law allows."
Dan Wang, China analyst at The Economist's Intelligence Unit
, told CNN that Beijing was afraid of "unilateral military action from the US" against North Korea.
"Thus this mechanism is a step to reduce misconceptions in either side's military intention, although the probability of all-out war with North Korea is low," she said.
"Before the 19th (Party) Congress, China fears more of its border instability than a nuclear-armed (North Korea). Official military talks with the US will be a deterrence to North Korea."
According to US officials, in recent months Chinese jets have carried out several "unsafe" intercepts of US planes
while patrolling international airspace over the East China Sea.
In the most recent incident, an armed Chinese J-10 fighter jet came within 300 feet (90 meters) of a US EP-3 reconnaissance plane, forcing it to take "evasive action," a US defense official told CNN.
China maintains an "Air Defense Identification Zone" over much of the East China Sea, something the United States does not recognize.
"This is uncharacteristic of the normal safe behavior we see from the Chinese military," Pentagon spokesman Jeff Davis said after the incident.
Another US official warned "encounters like this, ones that show a lack of control by the Chinese pilot, do nothing but increase the risk of miscalculation."