The top official in China's Xinjiang region has given the most detailed description yet of the alleged use of internment camps for Uighur Muslims.
In an interview with state media, Shohrat Zakir said the "vocational education" centres were proving effective in staving off terrorism.
He said "trainees" were grateful for the opportunity to change their ways and make their lives more "colourful".
China's massive security crackdown in Xinjiang has sparked widespread alarm.
Rights groups say Muslims are being detained indefinitely without charge for infractions like refusing to give a DNA sample, speaking in a minority language or arguing with officials.
Officials have denied allegations that up to a million Muslim Uighurs and other minority groups are being detained, but insist that action is necessary to prevent terrorism.
As chairman of the government in the autonomous western region, Shohrat Zakir is the most senior Xinjiang regional official to comment on the crackdown.
His extensive interview, published in the state-controlled Xinhua news agency, appears to be a further attempt by China to counter rising criticism of its operations in Xinjiang by depicting it as benevolence.
Mr Zakir said the region had been facing the "three evil forces" of terrorism, extremism and separatism since the 1990s, so the government had taken action to tackle the "root causes".
The "vocational education and training programme" – now written into Chinese law – enables "trainees" to "reflect on their mistakes and see clearly the essence and harm of terrorism and religious extremism", he said.
In the most detailed description yet of what goes on inside the centres, he said classes were given on Chinese history, language and culture and attendees were given "an awareness of the nation, citizenship and rule of law".
He did not say whether those attending were forced to do so, but indicated they were staying on site, saying that cafeterias provided "nutritious, free diets", dormitories were "fully equipped" and there were regular contests and sporting events.
'I have regained respect'
Scattered throughout the interview are quotes, purportedly from "graduates", praising the government for giving them the opportunity to change their ways.
"The government didn't give up on me. It has actively saved and assisted me, giving me free food, accommodation and education," said one. "I will cherish this opportunity and become a person useful to the country and society."
Another said his income had "increased a lot" since receiving training. "I have become the main support for my family. I can stand tall and start receiving praise from my elders. My wife has become more considerate. My kids are proud of me. I have regained respect and confidence."
Mr Zakir did not say how many people had been through the training, but said those who complete it have "notably enhanced national consciousness" and that Xinjiang was now "not only beautiful but also safe and stable".
"Many trainees have said that they were previously affected by extremist thought and had never participated in such kinds of art and sports activities, and now they have realised that life can be so colourful," he said.
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.
Xinjiang has seen cycles of violence and crackdowns for years, but rights groups say the current operation goes far beyond tackling terrorism and could ultimately worsen the security situation.
The World Uyghur Congress has said people are being held in detention indefinitely without charge.
Some former detainees have told the BBC of physical as well as psychological torture. They allege that entire families have disappeared.
Human Rights Watch has accused China of "rampant abuses" which violate the rights to freedom of expression, religion and privacy.
The US has said it would consider sanctioning China over its policies.