More than 400 pages of internal Chinese documents provide an unprecedented inside look at the crackdown on ethnic minorities in the Xinjiang region.

HONG KONG — The students booked their tickets home at the end of the semester, hoping for a relaxing break after exams and a summer of happy reunions with family in China’s far west.

Instead, they would soon be told that their parents were gone, relatives had vanished and neighbors were missing — all of them locked up in an expanding network of detention camps built to hold Muslim ethnic minorities.

The authorities in the Xinjiang region worried the situation was a powder keg. And so they prepared.

The leadership distributed a classified directive advising local officials to corner returning students as soon as they arrived and keep them quiet. It included a chillingly bureaucratic guide for how to handle their anguished questions, beginning with the most obvious: Where is my family?

“They’re in a training school set up by the government,” the prescribed answer began. If pressed, officials were to tell students that their relatives were not criminals — yet could not leave these “schools.” The question-and-answer script also included a barely concealed threat: Students were to be told that their behavior could either shorten or extend the detention of their relatives. “I’m sure that you will support them, because this is for their own good,” officials were advised to say, “and also for your own good.”

The directive was among 403 pages of internal documents that have been shared with The New York Times in one of the most significant leaks of government papers from inside China’s ruling Communist Party in decades. They provide an unprecedented inside view of the continuing clampdown in Xinjiang, in which the authorities have corralled as many as a million ethnic Uighurs, Kazakhs and others into internment camps and prisons over the past three years.

Read the Full Document: What Chinese Officials Told Children Whose Families Were Put in Camps

The party has rejected international criticism of the camps and described them as job-training centers that use mild methods to fight Islamic extremism. But the documents confirm the coercive nature of the crackdown in the words and orders of the very officials who conceived and orchestrated it.

Even as the government presented its efforts in Xinjiang to the public as benevolent and unexceptional, it discussed and organized a ruthless and extraordinary campaign in these internal communications. Senior party leaders are recorded ordering drastic and urgent action against extremist violence, including the mass detentions, and discussing the consequences with cool detachment.

Children saw their parents taken away, students wondered who would pay their tuition and crops could not be planted or harvested for lack of manpower, the reports noted. Yet officials were directed to tell people who complained to be grateful for the Communist Party’s help and stay quiet.

The leaked papers offer a striking picture of how the hidden machinery of the Chinese state carried out the country’s most far-reaching internment campaign since the Mao era. The key disclosures in the documents include:

• President Xi Jinping, the party chief, laid the groundwork for the crackdown in a series of speeches delivered in private to officials during and after a visit to Xinjiang in April 2014, just weeks after Uighur militants stabbed more than 150 people at a train station, killing 31. Mr. Xi called for an all-out “struggle against terrorism, infiltration and separatism” using the “organs of dictatorship,” and showing “absolutely no mercy.”

President Xi Jinping of China visiting a mosque in the city of Urumqi in 2014. Xinhua/Reuters

• Terrorist attacks abroad and the drawdown of American troops in Afghanistan heightened the leadership’s fears and helped shape the crackdown. Officials argued that attacks in Britain resulted from policies that put “human rights above security,” and Mr. Xi urged the party to emulate aspects of America’s “war on terror” after the Sept. 11 attacks.

• The internment camps in Xinjiang expanded rapidly after the appointment in August 2016 of Chen Quanguo, a zealous new party boss for the region. He distributed Mr. Xi’s speeches to justify the campaign and exhorted officials to “round up everyone who should be rounded up.”

• The crackdown encountered doubts and resistance from local officials who feared it would exacerbate ethnic tensions and stifle economic growth. Mr. Chen responded by purging officials suspected of standing in his way, including one county leader who was jailed after quietly releasing thousands of inmates from the camps.

The leaked papers consist of 24 documents, some of which contain duplicated material. They include nearly 200 pages of internal speeches by Mr. Xi and other leaders, and more than 150 pages of directives and reports on the surveillance and control of the Uighur population in Xinjiang. There are also references to plans to extend restrictions on Islam to other parts of China.

The documents include 96 pages of internal speeches by Mr. Xi, 102 pages of internal speeches by other officials, 161 pages of directives and reports on the surveillance and control of the Uighur population in Xinjiang and 44 pages of material from internal investigations into local officials. The documents include 96 pages of internal speeches by Mr. Xi, 102 pages of internal speeches by other officials, 161 pages of directives and reports on the surveillance and control of the Uighur population in Xinjiang and 44 pages of material from internal investigations into local officials. The documents include 96 pages of internal speeches by Mr. Xi, 102 pages of internal speeches by other officials, 161 pages of directives and reports on the surveillance and control of the Uighur population in Xinjiang and 44 pages of material from internal investigations into local officials. The documents include 96 pages of internal speeches by Mr. Xi, 102 pages of internal speeches by other officials, 161 pages of directives and reports on the surveillance and control of the Uighur population in Xinjiang and 44 pages of material from internal investigations into local officials. The documents include 96 pages of internal speeches by Mr. Xi, 102 pages of internal speeches by other officials, 161 pages of directives and reports on the surveillance and control of the Uighur population in Xinjiang and 44 pages of material from internal investigations into local officials.

Though it is unclear how the documents were gathered and selected, the leak suggests greater discontent inside the party apparatus over the crackdown than previously known. The papers were brought to light by a member of the Chinese political establishment who requested anonymity and expressed hope that their disclosure would prevent party leaders, including Mr. Xi, from escaping culpability for the mass detentions.

The Chinese leadership wraps policymaking in secrecy, especially when it comes to Xinjiang, a resource-rich territory located on the sensitive frontier with Pakistan, Afghanistan and Central Asia. Predominantly Muslim ethnic minority groups make up more than half the region’s population of 25 million. The largest of these groups are the Uighurs, who speak a Turkic language and have long faced discrimination and restrictions on cultural and religious activities.

A restaurant in the old city of Yarkand in August. Above patrons a propaganda poster is quoting Xi Jinping : "Every ethnic group must tightly bind together like the seeds of a pomegranate." Gilles Sabrié for The New York Times

Beijing has sought for decades to suppress Uighur resistance to Chinese rule in Xinjiang. The current crackdown began after a surge of antigovernment and anti-Chinese violence, including ethnic riots in 2009 in Urumqi, the regional capital, and a May 2014 attack on an outdoor market that killed 39 people just days before Mr. Xi convened a leadership conference in Beijing to set a new policy course for Xinjiang.

Since 2017, the authorities in Xinjiang have detained many hundreds of thousands of Uighurs, Kazakhs and other Muslims in internment camps. Inmates undergo months or years of indoctrination and interrogation aimed at transforming them into secular and loyal supporters of the party.

Of the 24 documents, the directive on how to handle minority students returning home to Xinjiang in the summer of 2017 offers the most detailed discussion of the indoctrination camps — and the clearest illustration of the regimented way the party told the public one story while mobilizing around a much harsher narrative internally.

Even as the document advises officials to inform students that their relatives are receiving “treatment” for exposure to radical Islam, its title refers to family members who are being “dealt with,” or chuzhi, a euphemism used in party documents to mean punishment.

Officials in Turpan, a city in eastern Xinjiang, drafted the question-and-answer script after the regional government warned local officials to prepare for the returning students. The agency coordinating efforts to “maintain stability” across Xinjiang then distributed the guide across the region and urged officials to use it as a model.

The government sends Xinjiang’s brightest young Uighurs to universities across China, with the goal of training a new generation of Uighur civil servants and teachers loyal to the party.

The crackdown has been so extensive that it affected even these elite students, the directive shows. And that made the authorities nervous.

“Returning students from other parts of China have widespread social ties across the entire country,” the directive noted. “The moment they issue incorrect opinions on WeChat, Weibo and other social media platforms, the impact is widespread and difficult to eradicate.”

The document warned that there was a “serious possibility” students might sink into “turmoil” after learning what had happened to their relatives. It recommended that police officers in plain clothes and experienced local officials meet them as soon as they returned “to show humane concern and stress the rules.” The directive’s question-and-answer guide begins gently, with officials advised to tell the students that they have “absolutely no need to worry” about relatives who have disappeared. “Tuition for their period of study is free and so are food and living costs, and the standards are quite high,” officials were told to say, before adding that the authorities were spending more than $3 per day on meals for each detainee, “even better than the living standards that some students have back home.” “If you want to see them,” the answer concluded, “we can arrange for you to have a video meeting.”

The authorities anticipated, however, that this was unlikely to mollify students and provided replies to a series of other questions: When will my relatives be released? If this is for training, why can’t they come home? Can they request a leave? How will I afford school if my parents are studying and there is no one to work on the farm?

The guide recommended increasingly firm replies telling the students that their relatives had been “infected” by the “virus” of Islamic radicalism and must be quarantined and cured. Even grandparents and family members who seemed too old to carry out violence could not be spared, officials were directed to say.

“If they don’t undergo study and training, they’ll never thoroughly and fully understand the dangers of religious extremism,” one answer said, citing the civil war in Syria and the rise of the Islamic State. “No matter what age, anyone who has been infected by religious extremism must undergo study.”

Students should be grateful that the authorities had taken their relatives away, the document said.

“Treasure this chance for free education that the party and government has provided to thoroughly eradicate erroneous thinking, and also learn Chinese and job skills,” one answer said. “This offers a great foundation for a happy life for your family.”

The authorities appear to be using a scoring system to determine who can be released from the camps: The document instructed officials to tell the students that their behavior could hurt their relatives’ scores, and to assess the daily behavior of the students and record their attendance at training sessions, meetings and other activities.

“Family members, including you, must abide by the state’s laws and rules, and not believe or spread rumors,” officials were told to say. “Only then can you add points for your family member, and after a period of assessment they can leave the school if they meet course completion standards.” If asked about the impact of the detentions on family finances, officials were advised to assure students that “the party and the government will do everything possible to ease your hardships.” The line that stands out most in the script, however, may be the model answer for how to respond to students who ask of their detained relatives, “Did they commit a crime?” The document instructed officials to acknowledge that they had not. “It is just that their thinking has been infected by unhealthy thoughts,” the script said. “Freedom is only possible when this ‘virus’ in their thinking is eradicated and they are in good health.”

Secret Speeches

The ideas driving the mass detentions can be traced back to Xi Jinping’s first and only visit to Xinjiang as China’s leader, a tour shadowed by violence.

In 2014, little more than a year after becoming president, he spent four days in the region, and on the last day of the trip, two Uighur militants staged a suicide bombing outside a train station in Urumqi that injured nearly 80 people, one fatally.

Weeks earlier, militants with knives had gone on a rampage at another railway station, in southwest China, killing 31 people and injuring more than 140. And less than a month after Mr. Xi’s visit, assailants tossed explosives into a vegetable market in Urumqi, wounding 94 people and killing at least 39.

Against this backdrop of bloodshed, Mr. Xi delivered a series of secret speeches setting the hard-line course that culminated in the security offensive now underway in Xinjiang. While state media have alluded to these speeches, none were made public.

The text of four of them, though, were among the leaked documents — and they provide a rare, unfiltered look at the origins of the crackdown and the beliefs of the man who set it in motion.

“The methods that our comrades have at hand are too primitive,” Mr. Xi said in one talk, after inspecting a counterterrorism police squad in Urumqi. “None of these weapons is any answer for their big machete blades, ax heads and cold steel weapons.”

“We must be as harsh as them,” he added, “and show absolutely no mercy.”

In free-flowing monologues in Xinjiang and at a subsequent leadership conference on Xinjiang policy in Beijing, Mr. Xi is recorded thinking through what he called a crucial national security issue and laying out his ideas for a “people’s war” in the region.

Although he did not order mass detentions in these speeches, he called on the party to unleash the tools of “dictatorship” to eradicate radical Islam in Xinjiang.

A watchtower this spring at a high-security facility near what is believed to be a re-education camp on the outskirts of Hotan. Greg Baker/Agence France-Presse — Getty Images

Mr. Xi displayed a fixation with the issue that seemed to go well beyond his public remarks on the subject. He likened Islamic extremism alternately to a virus-like contagion and a dangerously addictive drug, and declared that addressing it would require “a period of painful, interventionary treatment.”

“The psychological impact of extremist religious thought on people must never be underestimated,” Mr. Xi told officials in Urumqi on April 30, 2014, the final day of his trip to Xinjiang. “People who are captured by religious extremism — male or female, old or young — have their consciences destroyed, lose their humanity and murder without blinking an eye.”

In another speech, at the leadership conclave in Beijing a month later, he warned of “the toxicity of religious extremism.”

“As soon as you believe in it,” he said, “it’s like taking a drug, and you lose your sense, go crazy and will do anything.”

In several surprising passages, given the crackdown that followed, Mr. Xi also told officials to not discriminate against Uighurs and to respect their right to worship. He warned against overreacting to natural friction between Uighurs and Han Chinese, the nation’s dominant ethnic group, and rejected proposals to try to eliminate Islam entirely in China.

“In light of separatist and terrorist forces under the banner of Islam, some people have argued that Islam should be restricted or even eradicated,” he said during the Beijing conference. He called that view “biased, even wrong.”

But Mr. Xi’s main point was unmistakable: He was leading the party in a sharp turn toward greater repression in Xinjiang.

Before Mr. Xi, the party had often described attacks in Xinjiang as the work of a few fanatics inspired and orchestrated by shadowy separatist groups abroad. But Mr. Xi argued that Islamic extremism had taken root across swaths of Uighur society.

In fact, the vast majority of Uighurs adhere to moderate traditions, though some began embracing more conservative and more public religious practices in the 1990s, despite state controls on Islam. Mr. Xi’s remarks suggest he was alarmed by the revival of public piety. He blamed lax controls on religion, suggesting that his predecessors had let down their guard.

Chinese security forces securing an area outside a mosque in Kashgar, China, in 2014. Kevin Frayer/Getty Images

While previous Chinese leaders emphasized economic development to stifle unrest in Xinjiang, Mr. Xi said that was not enough. He demanded an ideological cure, an effort to rewire the thinking of the region’s Muslim minorities.

“The weapons of the people’s democratic dictatorship must be wielded without any hesitation or wavering,” Mr. Xi told the leadership conference on Xinjiang policy, which convened six days after the deadly attack on the vegetable market.

The Soviet Prism

Mr. Xi is the son of an early Communist Party leader who in the 1980s supported more relaxed policies toward ethnic minority groups, and some analysts had expected he might follow his father’s milder ways when he assumed leadership of the party in November 2012.

But the speeches underscore how Mr. Xi sees risks to China through the prism of the collapse of the Soviet Union, which he blamed on ideological laxity and spineless leadership.

Across China, he set about eliminating challenges to party rule; dissidents and human rights lawyers disappeared in waves of arrests. In Xinjiang, he pointed to examples from the former Soviet bloc to argue that economic growth would not immunize a society against ethnic separatism.

The Baltic republics were among the most developed in the Soviet Union but also the first to leave when the country broke up, he told the leadership conference. Yugoslavia’s relative prosperity did not prevent its disintegration either, he added.

“We say that development is the top priority and the basis for achieving lasting security, and that’s right,” Mr. Xi said. “But it would be wrong to believe that with development every problem solves itself.”

In the speeches, Mr. Xi showed a deep familiarity with the history of Uighur resistance to Chinese rule, or at least Beijing’s official version of it, and discussed episodes rarely if ever mentioned by Chinese leaders in public, including brief periods of Uighur self-rule in the first half of the 20th century.

Violence by Uighur militants has never threatened Communist control of the region. Though attacks grew deadlier after 2009, when nearly 200 people died in ethnic riots in Urumqi, they remained relatively small, scattered and unsophisticated.

Even so, Mr. Xi warned that the violence was spilling from Xinjiang into other parts of China and could taint the party’s image of strength. Unless the threat was extinguished, Mr. Xi told the leadership conference, “social stability will suffer shocks, the general unity of people of every ethnicity will be damaged, and the broad outlook for reform, development and stability will be affected.”

Setting aside diplomatic niceties, he traced the origins of Islamic extremism in Xinjiang to the Middle East, and warned that turmoil in Syria and Afghanistan would magnify the risks for China. Uighurs had traveled to both countries, he said, and could return to China as seasoned fighters seeking an independent homeland, which they called East Turkestan.

“After the United States pulls troops out of Afghanistan, terrorist organizations positioned on the frontiers of Afghanistan and Pakistan may quickly infiltrate into Central Asia,” Mr. Xi said. “East Turkestan’s terrorists who have received real-war training in Syria and Afghanistan could at any time launch terrorist attacks in Xinjiang.”

Mr. Xi’s predecessor, Hu Jintao, responded to the 2009 riots in Urumqi with a clampdown but he also stressed economic development as a cure for ethnic discontent — longstanding party policy. But Mr. Xi signaled a break with Mr. Hu’s approach in the speeches.

“In recent years, Xinjiang has grown very quickly and the standard of living has consistently risen, but even so ethnic separatism and terrorist violence have still been on the rise,” he said. “This goes to show that economic development does not automatically bring lasting order and security.”

Ensuring stability in Xinjiang would require a sweeping campaign of surveillance and intelligence gathering to root out resistance in Uighur society, Mr. Xi argued.

He said new technology must be part of the solution, foreshadowing the party’s deployment of facial recognition, genetic testing and big data in Xinjiang. But he also emphasized old-fashioned methods, such as neighborhood informants, and urged officials to study how Americans responded to the Sept. 11 attacks.

Like the United States, he said, China “must make the public an important resource in protecting national security.”

“We Communists should be naturals at fighting a people’s war,” he said. “We’re the best at organizing for a task.”

The only suggestion in these speeches that Mr. Xi envisioned the internment camps now at the heart of the crackdown was an endorsement of more intense indoctrination programs in Xinjiang’s prisons.

“There must be effective educational remolding and transformation of criminals,” he told officials in southern Xinjiang on the second day of his trip. “And even after these people are released, their education and transformation must continue.”

Within months, indoctrination sites began opening across Xinjiang — mostly small facilities at first, which held dozens or hundreds of Uighurs at a time for sessions intended to pressure them into disavowing devotion to Islam and professing gratitude for the party.

Then in August 2016, a hard-liner named Chen Quanguo was transferred from Tibet to govern Xinjiang. Within weeks, he called on local officials to “remobilize” around Mr. Xi’s goals and declared that Mr. Xi’s speeches “set the direction for making a success of Xinjiang.”

New security controls and a drastic expansion of the indoctrination camps followed.

“The struggle against terror and to safeguard stability is a protracted war, and also a war of offense,” Mr. Chen said in a speech to the regional leadership in October 2017 that was among the leaked papers. In another document, a record of his remarks in a video conference in August 2017, he cited “vocational skills, education training and transformation centers” as an example of “good practices” for achieving Mr. Xi’s goals for Xinjiang.

The crackdown appears to have smothered violent unrest in Xinjiang, but many experts have warned that the extreme security measures and mass detentions are likely to breed resentment that could eventually inspire worse ethnic clashes.

The camps have been condemned in Washington and other foreign capitals. As early as the May 2014 leadership conference, though, Mr. Xi anticipated international criticism and urged officials behind closed doors to ignore it.

“Don’t be afraid if hostile forces whine, or if hostile forces malign the image of Xinjiang,” he said.

‘Round Up Everyone’

The documents show there was more resistance to the crackdown inside the party than previously known — and highlight the key role that the new party boss in Xinjiang played in overcoming it.

Mr. Chen led a campaign akin to one of Mao’s turbulent political crusades, in which top-down pressure on local officials encouraged overreach and any expression of doubt was treated as a crime.

In February 2017, he told thousands of police officers and troops standing at attention in a vast square in Urumqi to prepare for a “smashing, obliterating offensive.” In the following weeks, the documents indicate, the leadership settled on plans to detain Uighurs in large numbers.

Mr. Chen issued a sweeping order: “Round up everyone who should be rounded up.” The vague phrase appears repeatedly in internal documents from 2017.

The party boss for the Xinjiang region, Chen Quanguo, right, during a Communist Party Congress in Beijing in 2017. Etienne Oliveau/Getty Images

The party had previously used the phrase — “ying shou jin shou” in Chinese — when demanding that officials be vigilant and comprehensive in collecting taxes or measuring harvests. Now it was being applied to humans in directives that ordered, with no mention of judicial procedures, the detention of anyone who displayed “symptoms” of religious radicalism or antigovernment views.

The authorities laid out dozens of such signs, including common behavior among devout Uighurs such as wearing long beards, giving up smoking or drinking, studying Arabic and praying outside mosques.

Party leaders reinforced the orders with warnings about terrorism abroad and potential copycat attacks in China.

For example, a 10-page directive in June 2017 signed by Zhu Hailun, then Xinjiang’s top security official, called recent terrorist attacks in Britain “a warning and a lesson for us.” It blamed the British government’s “excessive emphasis on ‘human rights above security,’ and inadequate controls on the propagation of extremism on the internet and in society.” It also complained of security lapses in Xinjiang, including sloppy investigations, malfunctions in surveillance equipment and the failure to hold people accused of suspicious behavior. Keep up the detentions, it ordered. “Stick to rounding up everyone who should be rounded up,” it said. “If they’re there, round them up.”

The number of people swept into the camps remains a closely guarded secret. But one of the leaked documents offers a hint of the scale of the campaign: It instructed officials to prevent the spread of infectious diseases in crowded facilities.

‘I Broke the Rules’

The orders were especially urgent and contentious in Yarkand County, a collection of rural towns and villages in southern Xinjiang where nearly all of the 900,000 residents are Uighur.

In the 2014 speeches, Mr. Xi had singled out southern Xinjiang as the front line in his fight against religious extremism. Uighurs make up close to 90 percent of the population in the south, compared to just under half in Xinjiang over all, and Mr. Xi set a long-term goal of attracting more Han Chinese settlers.

He and other party leaders ordered a quasi-military organization, the Xinjiang Production and Construction Corps, to accelerate efforts to settle the area with more Han Chinese, the documents show.

A few months later, more than 100 Uighur militants armed with axes and knives attacked a government office and police station in Yarkand, killing 37 people, according to government reports. In the battle, the security forces shot dead 59 assailants, the reports said.

An official named Wang Yongzhi was appointed to run Yarkand soon afterward. With his glasses and crew cut, he looked the picture of a party technocrat. He had grown up and spent his career in southern Xinjiang and was seen as a deft, seasoned official who could deliver on the party’s top priorities in the area: economic development and firm control of the Uighurs.

But among the most revealing documents in the leaked papers are two that describe Mr. Wang’s downfall — an 11-page report summarizing the party’s internal investigation into his actions, and the text of a 15-page confession that he may have given under duress. Both were distributed inside the party as a warning to officials to fall in line behind the crackdown.

Han officials like Mr. Wang serve as the party’s anchors in southern Xinjiang, watching over Uighur officials in more junior positions, and he seemed to enjoy the blessing of top leaders, including Yu Zhengsheng, then China’s most senior official for ethnic issues, who visited the county in 2015.

Mr. Wang set about beefing up security in Yarkand but he also pushed economic development to address ethnic discontent. And he sought to soften the party’s religious policies, declaring that there was nothing wrong with having a Quran at home and encouraging party officials to read it to better understand Uighur traditions.

When the mass detentions began, Mr. Wang did as he was told at first and appeared to embrace the task with zeal.

He built two sprawling new detention facilities, including one as big as 50 basketball courts, and herded 20,000 people into them.

He sharply increased funding for the security forces in 2017, more than doubling spending on outlays such as checkpoints and surveillance to 1.37 billion renminbi, or about $180 million.

And he lined up party members for a rally in a public square and urged them to press the fight against terrorists. “Wipe them out completely,” he said. “Destroy them root and branch.”

Military police at a rally in Hotan, in February 2017. Agence France-Presse — Getty Images

But privately, Mr. Wang had misgivings, according to the confession that he later signed, which would have been carefully vetted by the party.

He was under intense pressure to prevent an outburst of violence in Yarkand, and worried the crackdown would provoke a backlash.

The authorities set numeric targets for Uighur detentions in parts of Xinjiang, and while it is unclear if they did so in Yarkand, Mr. Wang felt the orders left no room for moderation and would poison ethnic relations in the county.

He also worried that the mass detentions would make it impossible to record the economic progress he needed to earn a promotion.

The leadership had set goals to reduce poverty in Xinjiang. But with so many working-age residents being sent to the camps, Mr. Wang was afraid the targets would be out of reach, along with his hopes for a better job.

His superiors, he wrote, were “overly ambitious and unrealistic.”

“The policies and measures taken by higher levels were at gaping odds with realities on the ground and could not be implemented in full,” he added.

To help enforce the crackdown in southern Xinjiang, Mr. Chen transferred in hundreds of officials from the north. Publicly, Mr. Wang welcomed the 62 assigned to Yarkand. Privately, he seethed that they did not understand how to work with local officials and residents.

The pressure on officials in Xinjiang to detain Uighurs and prevent fresh violence was relentless, and Mr. Wang said in the confession — presumably signed under pressure — that he drank on the job. He described one episode in which he collapsed drunk during a meeting on security.

“While reporting on my work in the afternoon meeting, I rambled incoherently,” he said. “I’d just spoken a few sentences and my head collapsed on the table. It became the biggest joke across the whole prefecture.”

Thousands of officials in Xinjiang were punished for resisting or failing to carry out the crackdown with sufficient zeal. Uighur officials were accused of protecting fellow Uighurs, and Gu Wensheng, the Han leader of another southern county, was jailed for trying to slow the detentions and shield Uighur officials, according to the documents.

Secret teams of investigators traveled across the region identifying those who were not doing enough. In 2017, the party opened more than 12,000 investigations into party members in Xinjiang for infractions in the “fight against separatism,” more than 20 times the figure in the previous year, according to official statistics.

Mr. Wang may have gone further than any other official.

Quietly, he ordered the release of more than 7,000 camp inmates — an act of defiance for which he would be detained, stripped of power and prosecuted.

“I undercut, acted selectively and made my own adjustments, believing that rounding up so many people would knowingly fan conflict and deepen resentment,” Mr. Wang wrote. “Without approval and on my own initiative,” he added, “I broke the rules.”

Brazen Defiance

Mr. Wang quietly disappeared from public view after September 2017.

About six months later, the party made an example of him, announcing that he was being investigated for “gravely disobeying the party central leadership’s strategy for governing Xinjiang.”

The internal report on the investigation was more direct. “He should have given his all to serving the party,” it said. “Instead, he ignored the party central leadership’s strategy for Xinjiang, and he went as far as brazen defiance.”

Both the report and Mr. Wang’s confession were read aloud to officials across Xinjiang. The message was plain: The party would not tolerate any hesitation in carrying out the mass detentions.

Propaganda outlets described Mr. Wang as irredeemably corrupt, and the internal report accused him of taking bribes on construction and mining deals and paying off superiors to win promotions.

The authorities also emphasized he was no friend of Uighurs. To hit poverty-reduction targets, he was said to have forced 1,500 families to move into unheated apartments in the middle of the winter. Some villagers burned wood indoors to keep warm, leading to injuries and deaths, his confession said.

But Mr. Wang’s greatest political sin was not revealed to the public. Instead, the authorities hid it in the internal report.

“He refused,” it said, “to round up everyone who should be rounded up.”