China's foreign ministry lashed out at The New York Times on Monday over its release of leaked documents portraying the inner workings of Beijing's campaign to detain more than a million Muslims in re-education camps.

Spokesperson Geng Shuang accused the newspaper of ignoring the true reasons behind and success of what China terms a campaign to end poverty, separatism and religious extremism. He said the fact Xinjiang hasn't suffered a terrorist attack in three years — about the length of the time the internments have been carried out in earnest — demonstrates the correctness of the policy.

Geng told reporters at a daily briefing that the article is a "clumsy patchwork" based on "selected interpretation" of the documents.

"It is hyping up these so-called internal documents to smear China's efforts in Xinjiang. What is the agenda?" he said.

Did not question validity of documents

Geng said China would continue "to do a good job" in implementing policies in Xinjiang aimed at expanding development and prosperity.

"Xinjiang's continuing prosperity, stability, ethnic unity and social harmony are the strongest refutation to the allegations by certain media and individuals," he said.

Chinese President Xi Jinping played a pivotal role in demanding a harsh crackdown in Xinjiang. (Nicolas Asfouri/AFP via Getty Images)

Geng did not question the validity of the documents, which detail among other things the pivotal role played by President and Communist Party leader Xi Jinping in demanding a harsh crackdown in Xinjiang.

Xi is quoted as warning that economic development alone will not extinguish demands for independence among Xinjiang's Uighurs and other Muslim groups, who are linguistically, culturally and religiously distinct from China's majority Han people and make up about half of the vast, resource-rich region's population of 25 million.

Xi is also quoted as endorsing a more forceful indoctrination campaign among Muslims, seen as leading to the establishment of the sprawling network of camps.

"There must be effective educational remoulding and transformation of criminals," he told officials in heavily Uighur south Xinjiang during a 2014 trip. "And even after these people are released, their education and transformation must continue."

China first denied the existence of the camps, then described them as de-radicalization centres aimed at providing job training to raise living standards and make Muslims less susceptible to religious extremism and separatism.

Those released from the camps describe them as virtual prisons where conditions are difficult and punishments harsh. They say they are forced to renounce Islam and Uighur culture as backward and swear loyalty to Xi and the Communist Party in what some call a campaign of cultural genocide.

The camp network is the linchpin of a systematic attack on Muslim culture that has seen families torn apart and forced to host party workers in their homes to spy on them, mosques demolished and young Muslims forced to return from studying abroad.