Gangs armed with knives attacked a police station and a local government building on Wednesday in China’s restive far western Xinjiang region, leaving 27 dead in clashes with police, the government news agency Xinhua said.

The unrest in the region, home to a large Muslim Uighur minority, was the deadliest since July 2009, when nearly 200 people were killed in riots pitting Uighurs against ethnic Chinese in the region’s capital Urumqi.

Xinhua said Wednesday’s unrest erupted at about 6 a.m. in the remote township of Lukqun, about 200 km (120 miles) southeast of Urumqi.

Gangs attacked Lukqun’s police stations, the local government building and a construction site, stabbing people and setting fire to police vehicles, Xinhua quoted regional Communist Party officials as saying.

Nine policemen and security guards and eight civilians were killed before police shot dead 10 of the attackers, Xinhua quoted the officials as saying.

The reasons for the attacks were not immediately clear.

Many Uighurs, Muslims who speak a Turkic language, chafe at what they call Chinese government restrictions on their culture, language and religion.

China says it grants Uighurs wide-ranging freedoms and accuses extremists of separatism.