Death sentences for two men over violence in China's ethnically divided western region of Xinjiang earlier this year were justified, official media on Tuesday quoted academics as saying.

The Intermediate People's Court in Xinjiang's Kashgar prefecture sentenced Musa Hesen and Rehman Hupur to die for crimes including murder and taking part in a "terrorist group", the Xinhua news agency reported late Monday.

China blamed the April 23 violence that left 21 people dead on "terrorists", a charge rights groups say is often used to justify the authorities' use of force against members of the mostly Muslim Uighur minority.

Xinjiang, a region more than four times the size of Japan, is 46 percent Uighur and 39 percent Han, China's dominant ethnic group, official figures show.

Many Uighurs complain of religious and cultural repression by Chinese authorities, and the region is regularly hit by unrest.

"Upholding laws during our fight against terrorism helps people at home and abroad get a clearer understanding about terrorist threats in Xinjiang," Li Wei said according to the Global Times, a newspaper affiliated with China's ruling Communist Party.

It described him as an expert on anti-terrorism at the China Institutes of Contemporary International Relations.

Turgunjan Tursun, a research fellow at the Xinjiang Academy of Social Science, asserted that the violence was unrelated to ethnic, religious or political issues, according to the paper.

"No matter what banner (the terrorists carry) or slogan (they use), violent attacks are against the law," Tursun told the paper.

"We must punish the crime in accordance with the law, and the sentence was a demonstration of that."

Hesen was accused of leading the group and manufacturing explosives.

Another three men accused of belonging to the group were given prison sentences ranging from nine years to life, Xinhua reported.

All of the defendants reportedly confessed to their crimes in court.

A total of 19 suspects were arrested after the April incident in Kashgar's Bachu county, which saw gunfights break out.

Fifteen police and community workers and six "terrorists" were killed.

Riots involving Uighurs and Han in Xinjiang's capital Urumqi in 2009 killed around 200 people, leading the Communist Party to tighten surveillance and boost investment in the region.

China said in November 2009 that it had executed nine people involved in that unrest. More death sentences were handed down later.

In December three men were condemned to death for trying to hijack an aircraft flying from Hotan to Urumqi, Xinhua reported at the time, saying that they "loudly shouted religious extremist cries" during the incident.

Chinese authorities imposed tight control in Urumqi in early July, the fourth anniversary of the rioting, which came days after two incidents in the region left at least 35 people dead.