A set of Chinese Communist Party documents was leaked to The New York Times and published last weekend. They not only reveal the rationale and implementation of the Chinese Communist Party’s policies in Xinjiang, a nominally autonomous region in northwestern China. They also open a window onto how China functions today, both at the top and closer to the bottom of its party-state hierarchy. And that reveals two things about the C.C.P.: its awesome power and its fundamental weakness.

From excerpts from the documents and the reporting, we learn that Xi Jinping, the party’s chairman and the country’s president, reacted strongly to a trio of terrorist attacks in the spring of 2014. Previously, the party’s policy toward the peoples of Xinjiang — Uighurs and Kazakhs and other mostly Turkic-speaking, Muslim ethnic minorities — had largely been based on the theory that economic development and improved standards of living would defuse any dissent. This idea derives from traditional Marxist thinking: The “superstructure” of ideology, theorists argued, is determined by the economic “base” of class relations. But after the attacks of 2014, Mr. Xi jettisoned this notion, and in a series of speeches concluded that material measures alone had proved insufficient to quell separatist sentiment in Xinjiang .

Henceforth, Mr. Xi announced, it would be necessary to transform the thinking of Xinjiang’s Muslims through psychological means. This initiated what would become a campaign of mass indoctrination against what Mr. Xi and the C.C.P. called the “virus” of “religious extremism.” In practice, the effort meant targeting everyday expressions of Islamic belief (owning a Quran, praying, avoiding alcohol and tobacco, fasting during Ramadan) and even secular aspects of non-Chinese culture (such as Uighur language and music ). Mr. Xi also called for expanding surveillance through both high-tech systems and low-tech boots on the ground.

In the couple of years that followed the transfer of Chen Quanguo, previously the first party secretary in Tibet, to the same top position in Xinjiang in August 2016, some 350,000 people were arrested and prosecuted and more than one million Uighurs and Kazakhs were interned extralegally to undergo indoctrination. Some of the detainees were then transferred to factories associated with the camps, where they were made to work for low or, in some cases, no wages.