BEIJING — China has sentenced four people to death over unrest in the ethnically-torn Xinjiang region, state media reported Thursday, after vowing to crack down on "terrorism" in the troubled far-western area.

Two others were jailed for 19 years over a wave of deadly violence in July in the region, where the mainly Muslim Uighur minority has long chafed against Chinese rule, and authorities claim that Pakistan-trained terror cells operate.

The four were handed the death penalty Wednesday after being found guilty a day earlier of masterminding and engaging in terrorist organisations, illegally making explosives, murder and arson, the official Xinhua news agency said, citing the local website, which is also state-run.

The report said the two who received jail sentences were "accomplices" in the violence. The guilty verdicts were handed down by intermediate courts in remote Kashgar and Hotan, it said.

The rulings related to a July 18 assault on a police station in Hotan which killed four people, and two attacks on July 30 and 31 in Kashgar that left 13 dead, Xinhua said, without specifying how many were sentenced over each attack.

The incidents formed part of a wave of unrest that killed at least 21 people, including eight suspects allegedly involved in the attacks, prompting the top official in Xinjiang to vow a tough crackdown.

The Hotan clash was described by an official in the region as a terror attack on a police station by a crowd who killed four, including a police officer. But activists called it an outburst of anger by ordinary Uighurs.

The Germany-based World Uyghur Congress, citing sources in Xinjiang, said security forces beat 14 people to death and shot dead six others during the unrest, and accused authorities of trying to block information on the incident.

Less than two weeks later, violence broke out in the ancient Silk Road city of Kashgar.

Seven people were killed on July 30 and another 28 hurt when two attackers with knives struck at a night market in the city, one of whom was later killed, according to authorities.

A day later six people were killed in another attack, two in a restaurant and four "hacked...arbitrarily" outside, with another 12 civilians and three police wounded, according to Xinhua, which said the restaurant was set ablaze.

The World Uyghur Congress said that security forces had shot dead six people and injured nine in the July 31 incident.

An elite police counter-terror squad, the Snow Leopard Commando unit, was sent to the area in August and Zhang Chunxian, Communist Party chief for Xinjiang, vowed a "strike-hard policy in the crackdown against terrorists".

A militant Muslim organisation believed to be based in Pakistan issued a video expressing support for the Xinjiang attacks this month and predicting more violence, according to the US-based monitoring group SITE.

Purportedly made by the Turkistan Islamic Party (TIP), the video showed the group's leader Abdul Shakoor Damla, his face obscured, saying the violence was revenge against China's government for "maiming the identity of the Muslims".

Beijing has blamed much of Xinjiang's unrest on the "three forces" of extremism, separatism and terrorism and said Pakistan-trained Muslim separatists were behind the latest attacks.

But some experts doubt that terror cells operate in Xinjiang, where Uighurs are Sunni and practice a moderate form of Islam.

They say the government has produced little evidence of an organised terrorist threat in the region, and argue its sporadic bouts of unrest stem more from long-standing local resentment.

Xinjiang -- a resource-rich and strategically vital region that borders eight countries -- is home to roughly nine million Turkic-speaking Uighurs who have long bridled under what many see as government oppression.

An influx of ethnic Han Chinese has fuelled anger, with some Uighurs complaining that Han get better jobs and pay and saying traditional Uighur culture is being deliberately diluted.

China executed "thousands" of people in 2010, according to estimates by Amnesty International, far more than any other country, although Beijing keeps its official figures secret.