A clash between knife-wielding attackers and police in China's volatile Xinjiang region left 16 people dead, including two police officers.
The officers were pursuing a terrorist suspect when they were attacked with knives, state media reported.
A spokesperson for China's Ministry of Foreign Affairs said "within the law."
Hua Chunying said assailants "used explosive devices to attack police officers" and attacked them with knives.
The incident is the latest in the string of deadly clashes between the Muslim Uighur population and the state in China's western Xinjiang region.
Sweden-based Uighur activist Dilxat Raxit said the incident was the latest example of how Chinese security forces are "increasingly opting to kill suspects at the scene rather than capturing them and putting them on trial."
More top news
Banking giant Barclays has posted a 10% rise in annual pre-tax profits to £3.54 billion, up from £3.23 billion in 2016
Mobile phone users in the UK receive more than 33,000 messages and alerts a year, new research shows.
Theresa May is set to host crunch Brexit talks at Chequers as she bids to unite her Cabinet over Britain's plans for exiting the EU.