Riots in China's ethnically divided Xinjiang region on Wednesday left 27 people dead, according to state media which said police opened fire on "knife-wielding mobs".
It was the latest spasm of violence to hit the troubled western region, which is about twice the size of Turkey and is home to around 10 million members of the mostly Muslim Uighur ethnic minority.
Police shot at "mobs" who had attacked police stations, a local government building and a construction site, the Xinhua news agency said, citing local officials.
"Seventeen people had been killed... before police opened fire and shot dead 10 rioters," it said. The mobs were also "stabbing at people and setting fire to police cars", the report said.
Nine police or security guards and eight civilians were killed before police opened fire, the report said, adding that three other people were taken to hospital with injuries.
The clashes occurred early Wednesday in the Lukqun township of Shanshan County, Xinhua said, about 100 kilometres (60 miles) from the desert city of Turpan and about 250 kilometres from the regional capital Urumqi.
The reason for the violence was not immediately clear, and police in Turpan refused to comment when contacted by AFP.
Many of Xinjiang's Uighur community complain of religious and cultural repression by Chinese authorities, and the region is regularly hit by unrest.
Chinese authorities have often blamed clashes in the region on "terrorists", but initial state-media reports did not mention terrorism.
A verified Twitter account run by state-broadcaster CCTV called the violence a "riot", saying it was correcting an earlier message which described it as an "insurgent attack".
Dilshat Rexit, a spokesman for the World Uyghur Congress, an exile group branded by Beijing as "separatist", said "continued repression and provocation is the cause of conflict". His comment came in a statement sent to AFP after news of the violence emerged.
China reported that 21 people died in clashes between police and locals in the region in April, which the government said were caused by "terrorists", and a court in Xinjiang recently jailed nine people for "religious extremism".
China said clashes in 2011 that killed 19 were organised by terrorists who trained in Pakistan and were part of a separatist movement seeking an independent state in Xinjiang.
Uighur rights groups have dismissed the claims of terrorism, citing economic inequality and religious repression as causes of unrest.
The region's worst ethnic violence in recent years occurred in July 2009, when riots involving Uighurs and settlers from China's Han ethnic majority killed around 200 people in Urumqi.
Those clashes led to a major security push in the region, which rights groups have said resulted in intense monitoring of Uighurs by security forces.
A specialised anti-terrorism unit of the People's Liberation Army carried out drills in April, according to a previous report by the PLA Daily.
The region saw more than half of China's trials for the charge of "endangering state security" last year, but is home to less than two percent of the country's population, suggesting "ethnic discrimination", the US-based Dui Hua Foundation advocacy group said.
Beijing has launched a stream of high-profile investment projects in an attempt to boost economic growth in the relatively poor region, which has rich reserves of coal and gas.
According to official figures, 46 percent of Xinjiang's population are Uighur, while another 39 percent are Han Chinese, after millions from the majority group moved there in recent decades in search of jobs.
The Han settlement drive, which has been mirrored in Tibet, has fostered tensions with the existing community.
The Uighurs, who mostly follow Sunni Islam, speak a Turkic language and have ethnic links with groups in neighbouring countries including Russia, Kazakhstan and Kyrgyzstan.
Xinjiang's regional government was not available for comment on Wednesday's violence. China's foreign ministry spokeswoman Hua Chunying said at a regular briefing that she was aware of reports, without giving further information.
Information about unrest in Xinjiang is tightly controlled by China's ruling Communist Party -- and the government blocked Internet access across the region for several months following the clashes in 2009.