The United States and China wrapped up two days of military talks in Washington Tuesday, the Pentagon said, the latest engagement since the two countries agreed to resume military-to-military ties.

Washington and Beijing are at loggerheads over everything from the future of democratically ruled Taiwan to territorial claims in the South China Sea. Ties are still recovering after the U.S. downed an alleged Chinese spy balloon in February.

U.S. President Joe Biden and Chinese President Xi Jinping agreed late last year to resume military ties, severed by Beijing after a visit in August 2022 by then-House of Representatives Speaker Nancy Pelosi to Taiwan.

The 17th round of the talks saw Michael Chase, the deputy assistant secretary of defense for China, Taiwan, and Mongolia, meet China’s Major General Song Yanchao, deputy director of the central military commission office for international military co-operation, the Pentagon said.

“The two sides discussed U.S.-PRC defense relations, and Chase highlighted the importance of maintaining open lines of military-to-military communication in order to prevent competition from veering into conflict,” the statement added, using an acronym for the People’s Republic of China.

Pentagon officials say communication between the two militaries is key to preventing a miscalculation from spiraling into conflict.

The top U.S. military officer, General Charles Q. Brown, the chairman of the Joint Chiefs of Staff held a virtual meeting last month with his Chinese counterpart, General Liu Zhenli.

China is willing to develop healthy and stable military-to-military relations with the U.S. “on the basis of equality and respect,” its defense ministry said in a statement Wednesday, citing the meeting.

It urged the U.S. to cut military deployment and “provocative actions” in the South China Sea, as well halt support for such actions by “certain countries,” but did not identify them.

It asked the U.S. to abide by the one-China principle and stop arming Taiwan, which China claims as its own territory, despite Taiwan’s strong objections, and vowed never to compromise on the issue.

“The United States should fully understand the root causes of the maritime and air security issues, strictly restrain its front-line forces, and stop hyping up (the issues),” it added.

Taiwan is holding presidential and parliamentary polls this weekend amid a ramped-up war of words between Taiwan and China.

U.S. officials have cautioned that even with some restoration of military communications, forging truly functional dialog between the two sides could take time.

(Reporting by Idrees Ali and Phil Stewart in Washington, Liz Lee in Beijing; Editing by Clarence Fernandez)