capital of the Xinjiang Uyghur Autonomous Region (XUAR) province, Urumqi.
The clashes were triggered when local government officials were searching for weapons in homes and were allegedly taken hostage by "gang members".
"Three community workers discovered suspicious individuals and knives in the home of a local resident. They then reported the situation to their supervisors via phone but were seized by the suspects who had been hiding in the house," a brief report by the state-run Xinhua news agency said on Wednesday.
As reinforcements in the form of more police personnel rushed towards the house where their colleagues were held hostage, they were attacked.
"Police officers and community officials from the township rushed to the scene, but were attacked and killed by the suspects, who also killed the three community workers they had seized earlier and burned the house," it said.
Among the 21 people killed in the clashes 15 were local government officials and police personnel; the remaining six were "gang members" who the Xinhua report called as "terrorists".
"To the best of my knowledge, yesterday in Kashgar county… serious bomb attacks left 15 people dead among whom 10 are Han Chinese, 3 are Uyghur and the rest from the Mongolian ethnic group," foreign ministry spokesperson, Hun Chunying said at the daily press briefing on Wednesday.
"The police shot dead six suspects and arrested eight suspects according to the public security bureau. This case is a case of violence and terrorism and the further situation should be verified," she added.
An initial investigation has indicated that the suspects are all terrorists who were planning on violent attacks, Xinhua report alleged.
"Currently the situation in Xinjiang is mainly stable but some people are trying to make trouble to interrupt the peace and tranquillity of Xinjiang. Their schemes are doomed to failure. China is a country ruled by law. Cracking down on crimes and protecting safety of people and property is the sacred duty of the judicial authorities," Hua added.
It is difficult to independently verify information coming out from Xinjiang. The Chinese media also sticks to official reports from state-run agencies.
The region has seen sporadic clashes between the majority community of Uyghurs and the local government.
In December, the government said that three suspected suicide bombers from the Uyghur community had been given death penalties for attempting to hijack and blow up a domestic flight in June, 2012. The court said that those sentenced were influenced by "religious extremism" for about five months last year but did not give further details.