A court in the unruly far western Chinese region of Xinjiang sentenced 12 people to death and handed out dozens of other heavy sentences on Monday for attacks in July in which almost 100 people died.

The Xinjiang government said 59 “terrorists” were gunned down by security forces in Yarkant county in Xinjiang's far south, while 37 civilians were killed in the July 28 attacks.

Authorities said people had been killed when knife-wielding attackers had staged assaults in two towns.

Hundreds of people have been killed in the region in the past two years, most in violence between the Muslim Uighur people who call Xinjiang home and ethnic majority Han Chinese. The government has also blamed attacks in other parts of China, including Beijing, on Islamist militants from Xinjiang.

The court in the old Silk Road city of Kashgar found the accused guilty of a variety of crimes, including terrorism, murder, kidnap and making explosives, according to a statement on the Xinjiang government's news website.

Sentenced to death, life, jail

Aside from the 12 death sentences, 15 others were given suspended death sentences, nine got life in jail and another 20 sentences ranging from four to 20 years.

All of them were Uighurs, judging by their names.

The official account described how the attackers set up road blocks and dragged out some of their victims before hacking them to death.

Heavy restrictions on journalists in Xinjiang, where China has attributed recent violence to Islamist separatists it says seek to establish an independent state called East Turkestan, make verifying details about incidents difficult.

Earlier in the day, state television said that two “thugs” stabbed to death a policewoman in Xinjiang.

Attack on policewoman

The motorcycle-mounted attackers used sharp weapons to “cruelly attack and kill” the policewoman, China Central Television (CCTV) said on its official microblog.

Media did not specify the ethnicity of the policewoman but judging by her name, she was Uighur. CCTV citied a colleague of the woman as saying she was two months pregnant.

The attack occurred on Friday near a market in Pishan county, in Hotan prefecture.

The attack on the policewoman follows the killing of a state-backed Uighur imam in July, incidents that suggest growing antagonism toward Uighurs aligned with the government.

Exiled Uighur groups and human rights activists say the government's own repressive policies in the region, on the borders of Central Asia, Afghanistan, Pakistan and India, have provoked unrest, an accusation the government denies.

In September, state media said police shot dead 40 rioters, some of whom were seeking to blow themselves up, after explosions in Luntai county.