China’s behavior in a narrowly averted naval collision in the South China Sea was both “unhelpful” and “irresponsible,” US Secretary of Defense Chuck Hagel said on Thursday, warning against incidents that could escalate US-Chinese tension.

“That action by the Chinese, cutting their ship 100 yards out in front of the [USS] Cowpens, was not a responsible action. It was unhelpful; it was irresponsible,” Hagel told reporters at the Pentagon.

Hagel said the maritime confrontation, the first reported for several years, pointed to the need for clear protocols between the two militaries to avoid a potential clash in the Pacific.

“That’s the kind of thing that’s very incendiary, that could be a trigger or a spark that could set off some eventual miscalculation,” he said.

The two sides needed to work “to have a mechanism to be able to defuse some of these issues as they occur,” Hagel said. “We’re working on it.”

His comments were the first public reaction by a top official at the Pentagon since the incident two weeks ago.

China on Wednesday acknowledged an encounter earlier this month between a Chinese naval vessel and the US warship in the South China Sea.

China said its ship was conducting “normal patrols” when it encountered the US missile cruiser and its official news agency accused the US of deliberate provocative behavior.

However, US officials said the US ship was forced to take evasive action to avoid a collision.

Asked about Hagel’s comments, Chinese Ministry of Foreign Affairs spokeswoman Hua Chunying (華春瑩) said: “For the US and Chinese militaries to maintain a healthy and stable relationship that is beneficial to both countries, both sides must do their best to meet each other half-way.”

The near-collision came after Beijing’s declaration of an air defense identification zone further north, in the East China Sea, ratcheted up tension and drew criticism from Washington, Tokyo and Seoul.

General Martin Dempsey, chairman of the US military’s Joint Chiefs of Staff, said there had been no changes to rules of engagement given to forces in that region in order to prevent run-ins with China.

“What we do constantly though is we remain alert for changes in the environment,” Dempsey said. “There are times that are more sensitive than others and we’re in a heightened period of sensitivity. And you can count on our mariners and airmen to be aware of that.”

China has played down the incident, saying its naval forces followed proper procedures

“During the encounter, the Chinese naval vessel strictly followed protocol and handled [the incident] appropriately,” a statement from the Chinese Defense Ministry said.