Riots have killed 27 people in China’s restive far western region of Xinjiang, Chinese state media report.
The violence broke out in Turpan prefecture early on Wednesday.
Police opened fire after a mob armed with knives attacked police stations and a local government building, Xinhua news agency quoted officials as saying.
There are sporadic outbreaks of violence in Xinjiang, where there are ethnic tensions between Muslim Uighur and Han Chinese communities.
Confirming reports from the region is difficult because information is tightly controlled.
The violence occurred in Turpan’s remote township of Lukqun, about 200km (120 miles) south-east of the region’s capital, Urumqi.
The Xinhua news agency report, citing local officials, said rioters stabbed people and set police cars alight.
Seventeen people, including nine security personnel and eight civilians, were killed before police shot dead 10 of the rioters, it said.
At least three others were injured and were being treated in hospital, it added.
The Xinhua report did not provide any information on the ethnicity of those involved in the riot or on what sparked it.
But Dilxat Raxit, a spokesperson for the World Uighur Congress, an umbrella organisation of Uighur groups, told the Associated Press news agency the violence had been caused by the Chinese government’s “sustained repression and provocation” of the Uighur community.
In 2009 almost 200 people – mostly Han Chinese – were killed after deadly rioting erupted in Urumqi between the Han Chinese and Uighur communities.
In April an incident in the city of Kashgar left 21 people dead.
The government said the violence began when “terrorists” were discovered in a building by officials searching for weapons.
But local people told the BBC that the violence involved a local family who had a longstanding dispute with officials who had been pressurising the men to shave off their beards and the women to take off their veils.
Uighurs make up about 45% of Xinjiang’s population, but say an influx of Han Chinese residents has marginalised their traditional culture.
Beijing authorities often blame violent incidents in Xinjiang on Uighur extremists seeking autonomy for the region. Uighur activists, meanwhile, accuse Beijing of over-exaggerating the threat to justify heavy-handed rule.