Chinese President Xi Jinping told top White House aide Jake Sullivan Thursday that Beijing remained committed to good ties with the United States, despite "great changes".
Sullivan, the first US national security advisor to visit China since 2016, met with Xi as he wrapped up three days of talks in the Chinese capital which also saw him meet Foreign Minister Wang Yi and other high-ranking officials.
Sullivan's visit comes as China is embroiled in security rows with US allies Japan and the Philippines.
But state broadcaster CCTV said Xi told Sullivan that in spite of "great changes", China and the US could still enjoy good ties.
"China's commitment to the goal of stable, healthy, and sustainable development of China-US relations hasn't changed," Xi said.
"We hope that the US will work with China to meet each other halfway," he added, according to CCTV.
Earlier in the day, Sullivan met with senior Chinese army chief Zhang Youxia at the Beijing headquarters of the Central Military Commission, where the two discussed Taiwan and other flashpoint issues.
"It's rare that we have the opportunity to have this kind of exchange," Sullivan told Zhang in opening remarks.
The two officials agreed to hold a call between the two sides' theatre commanders "in the near future", a readout from the White House said.
Sullivan also raised the importance of "freedom of navigation" in the South China Sea, where China and the Philippines have clashed in recent months, and "stability" in the Taiwan Strait, Washington said.
Zhang, in turn, warned that the status of the self-ruled island was "the first red line that cannot be crossed in China-US relations".
"China has always been committed to maintaining peace and stability in the Taiwan Strait," he said, according to a readout by Beijing's defence ministry.
"But 'Taiwan independence' and peace and stability in the Taiwan Strait are incompatible," he said.
"China demands that the US halts military collusion with Taiwan, ceases arming Taiwan, and stops spreading false narratives related to Taiwan," Zhang added.
He also asked Washington to "work with China to promote communication and exchanges between the two militaries and jointly shoulder the responsibilities of major powers".
Thursday's talks also saw Sullivan express "concerns about (Chinese) support for Russia's defense industrial base", the readout added -- echoing longstanding US claims that Beijing has rejected.
He also raised "the need to avoid miscalculation and escalation in cyber space, and ongoing efforts to reach a ceasefire and hostage deal in Gaza", the White House said.
On Wednesday, Sullivan and Wang discussed plans for their leaders to talk in the coming weeks -- and clashed over China's increasingly assertive approach in disputed maritime regions.
Sullivan "reaffirmed the United States' commitment to defending its Indo-Pacific allies", the White House said.
He also "expressed concern about (China's) destabilizing actions against lawful Philippine maritime operations" in the disputed South China Sea, it said.
Chinese state media reported that Wang issued his own warning to Washington.
"The United States must not use bilateral treaties as an excuse to undermine China's sovereignty and territorial integrity, nor should it support or condone the Philippines' actions of infringement," Wang told Sullivan, according to state broadcaster CCTV.
Wang and Sullivan previously met five times over the past year and a half -- in Washington, Vienna, Malta and Bangkok, as well as alongside US President Joe Biden and Xi in California last November.
During their latest encounter, they also discussed the tense issue of Taiwan.
China has kept up its sabre-rattling since the inauguration this year of President Lai Ching-te, whose party emphasises Taiwan's separate identity.