BANGKOK — China on Monday urged the U.S. military to “stop flexing muscles” in the disputed South China Sea, a point of persistent friction in a relationship both sides said was generally improving.

A spokesman for the Chinese Ministry of Defense, Col. Wu Qian, told reporters in Bangkok that the South China Sea was among numerous issues discussed earlier in the day when U.S. Defense Secretary Mark Esper held his first face-to-face meeting with the Chinese defense minister, Gen. Wei Fenghe. They met for more than half an hour on the margins of a broader Asia defense officials’ conference.

“We agreed to keep talking and engaging frequently,” Esper told reporters afterward in a brief exchange. “We continue to make progress on any number of issues.”

The South China Sea for years has been a major point of contention between Beijing and Washington. China claims the South China Sea as its sovereign territory, but those claims overlap with those of other Asian governments. The United States has no territorial stake but has periodically sailed Navy ships through areas of the sea that China considers off-limits.

Wu, the defense ministry spokesman, told a news conference that Esper and Wei had a “very positive and constructive” meeting and “agreed in many areas.” But he was clear that Beijing is irritated at the U.S. Navy’s presence in the South China Sea.

Wu said Wei reaffirmed China’s commitment to safeguarding “territorial sovereignty and maritime rights and interests” in the South China Sea.

“The Chinese side also urges the U.S. side to stop flexing muscles in the South China Sea and do not provoke and escalate tensions in the South China Sea,” he said through a Chinese interpreter. Asked by a reporter to be more specific about Chinese objections, Wu said the U.S. should “stop intervening in the South China Sea and stop military provocations.”

Esper spokesman Jonathan Hoffman said in a later statement that the U.S. defense secretary “pointedly reiterated that the United States will fly, sail and operate wherever international law allows — and we will encourage and protect the rights of other sovereign nations to do the same.”

Asked about China’s view on the civil unrest in Hong Kong, Wu said, “Ending violence and restoring order is the most pressing task we have in Hong Kong.”