Xinjiang has seen cycles of violence and crackdowns for years. China accuses Islamist militants and separatists of orchestrating the trouble.

What does the Chinese legislation say?

Xinjiang’s new legislation is the first detailed indication of what China is doing in the region.

It says examples of behaviour that could lead to detention include expanding the concept of halal – which means permissible in Islam – to areas of life outside diet, refusing to watch state TV and listen to state radio and preventing children from receiving state education.

Media playback is unsupported on your device

Media captionJohn Sudworth reports from Xinjiang, where all filming and reporting by foreign media is tightly controlled

New law bans promoting of religion

Michael Bristow, BBC News

By giving these camps a legal footing, China appears to have confirmed what many have been saying for months: that it is running a string of re-education camps for Uighur Muslims in Xinjiang in the name of combating extremism.

“In the end, all the officials had one key point. The greatness of the Chinese Communist Party, the backwardness of Uighur culture and the advanced nature of Chinese culture,” former detainee Abdusalam Muhemet told the newspaper.

The World Uyghur Congress said in a report that detainees were held indefinitely without charge, and forced to shout Communist Party slogans.

It said they were poorly fed, and reports of torture were widespread.

Most inmates have never been charged with a crime, it is claimed, and do not receive legal representation.

However China’s state-run English-language Global Times newspaper maintains the tough security measures in the region have prevented it from turning into “China’s Syria” or “China’s Libya”.

Who are the Uighurs?

The Uighurs are ethnically Turkic Muslims mostly based in Xinjiang. They make up about 45% of the population there.

They see themselves as culturally and ethnically close to Central Asian nations, and their language is similar to Turkish.

In recent decades, large numbers of Han Chinese (China’s ethnic majority) have migrated to Xinjiang, and the Uighurs feel their culture and livelihoods are under threat.

Xinjiang is officially designated as an autonomous region within China, like Tibet to its south.