MOYU COUNTY, China — In a classroom in far western China, a dozen adults wearing white lab coats sit at a long table, textbooks on animal husbandry open in front of them.

The din of chickens and geese and a bucolic mural of cows belie the fact that the students are in one of a vast network of camps in Xinjiang, a region that is home to more than 10 million Muslim Uighurs.

Around 10 percent of the Uighur population of Xinjiang is locked up, according to the U.S. government and human rights organizations. The Chinese Communist Party maintains these centers are a crucial part of its effort to counter terror, extremism and separatism.

Uighur people at an education camp in Kashgar, China. Keir Simmons / NBC News

Bu’ayixiemu Abulizi, director of the Moyu County Vocational Education and Training Center in Hotan Prefecture in the southwestern corner of Xinjiang, made it clear the role of the centers is to change the minds and thoughts of those who are forced to live there.

“If we leave the terrorism thoughts to be developed, it is very easy to have riots or other issues. We prevent this from happening,” he told NBC News in early September. “Our center is to prevent terrorism thoughts from happening.”

International rights groups charge that Chinese authorities are actually engaging in mass arbitrary detention, torture and mistreatment of Uighurs in Xinjiang. Human Rights Watch, a nonprofit group based in New York, has alleged “rampant abuses,” including torture and unfair trials of the population.

Gay McDougall, a member of the United Nations Committee on the Elimination of Racial Discrimination, accused China last year of turning Xinjiang into “something resembling a massive internment camp that is shrouded in secrecy, a sort of no-rights zone.”

Members of China's Uighur minority attend a class at a vocational education and training center in Moyu County. Keir Simmons / NBC News

The Chinese government gave NBC News rare access to three of what it calls “vocational education and training centers” where they say Uighurs receive lessons in law and culture, Mandarin, and skills like shop-keeping, hospitality, animal husbandry and e-commerce.

Government minders brought NBC News to two camps in Hotan Prefecture and one in Kashgar, in the northwest of the province. NBC spoke to the director of each camp, and Uighur detainees were made available for interviews, always with government and camp officials present.

At the camps NBC News visited, dormitories were sparsely furnished with few personal possessions. Some classrooms were equipped with computers and others with musical instruments. It is impossible to know whether conditions in the camps were changed or improved for the purpose of NBC’s visit, or whether conditions in other camps are similar.

The government did not answer NBC News’ questions on how many centers there are in the region, how many people have passed through them or how many are currently being held there. The Australian Strategic Policy Institute, a nonpartisan think tank, estimates that there are 143 camps currently detaining Uighurs.

In front of minders, farmer Abliza Hijgiabula admitted his wrongdoing.

“As a Chinese citizen, I have broken Chinese laws and regulations, I committed a crime, I betrayed my country, I broke the law and wasn’t grateful for the good policies,” the 41-year-old farmer, who was imprisoned for six years for preaching separatism, said.

Abliza Hijgiabula learns animal hursbandry at an education camp in Xinjiang, China. Keir Simmons / NBC News

Hijgiabula, who spoke with NBC News during a class in animal husbandry, said he had been released from prison and sent to the camp, where he had spent a year.

According to Chinese officials, there are three types of students at these reeducation centers: those who have committed a minor offense like wearing a burqa or watching an illegal religious video; those who have committed more serious offenses and were given the choice to attend instead of going to jail; and others who are sent for rehabilitation after a prison term.

Abulizi, the camp director, said that when people arrive, they are first given lessons in Chinese law and Mandarin, China’s national language. Then they are taught vocational skills, he said.

To leave the centers, the detainees must pass exams, officials said. Despite repeated requests, officials would not provide the exact criteria they use to determine a person’s release. Instead, they said that “graduation” tests combine assessments of language skills, understanding of Chinese law and regulations, “de-radicalization” and vocational skills.

While officials may teach Mandarin and vocational skills at the camps, that is not their real purpose, according to Dennis Wilder, a former National Security Council director for China and former CIA deputy assistant director for East Asia and the Pacific.

Uighur people learn practical skills at an education camp in Xinjiang, China. Keir Simmons / NBC News

“They're really about crushing, to some degree, the Muslim culture, the Uighur culture – getting people to feel much more bonded to the Communist Party than to their own religious beliefs,” said Wilder, who is also the managing director of the Initiative for U.S.-China Dialogue on Global Issues at Georgetown University in Washington. “This is trying to fundamentally change the hearts and minds of these people. It's about enforcing allegiance.”

“This is a war against separatism,” he added. “And they’re going to use whatever techniques they need to make sure they suppress this.”

Omar Kanat, director of the Uyghur Human Rights Project, a rights advocacy organization based in Washington, called the centers “concentration camps” which aim is to wipe out Uighur culture.

Abdulhaber Rejep, who has not seen his wife Aygul Abdulla in three years, sits with his youngest son, Hamza. NBC News

“They are forcing the detainees to renounce their religion, renounce their culture, renounce their identity, force them to speak Mandarin,” said Kanat, who also serves as the chairman of the World Uyghur Congress’ Executive Committee and advocates for an independent Uighur state. “They are forcing them to say there is no God, there is only the Communist Party.”

In Istanbul, Uighurs who have fled China told NBC News that some of their relatives in Xinjiang have been detained and not heard from since.

Abdulhaber Rejep told NBC News that he and his wife, Aygul Abdulla, fled to the neighboring nation of Kyrgyzstan. Three years ago, and 10 days after she gave birth to a boy, Hamza, she went to Xinjiang to pick up the couple’s four other sons to take them back to Turkey. Rejep says he has not seen his wife and older sons since.

“Once she returned to the homeland, the local government, the Communists, confiscated her passport by saying, ‘We will give back your passport later.’”

After that, in May 2017, Abdulla was detained and imprisoned, Rejep said, while playing with Hamza.

“Later, I heard from other people that she was sentenced to nine years in jail,” he added, speaking from his home in Istanbul, where he is part of the largest expatriate Uighur population outside of Central Asia.

NBC News was not able to independently confirm this account. Chinese officials dismiss such stories as lies.

Serious tensions have plagued relations between the Chinese state and the Uighur population in Xinjiang in the last 25 years. The area is rich in natural resources and is part of Chinese President Xi Jinping’s Belt and Road Initiative — a massive infrastructure project to connect China with the rest of Asia, Europe and Africa.

Chinese officials say that since 1990, “several thousand” people have been killed or injured in “explosions, assassinations, poisoning, arson and riots” carried out by Uighurs.

In 2009, rioting in the Xinjiang regional capital of Urumqi left nearly 200 dead, the Chinese say. Uighur militants have been accused of attacks on train stations, markets and a car bombing in Tiananmen Square in Beijing that killed two tourists. In March 2014, a group of Uighurs killed 31 at a train station in the southwestern city of Kunming and just a few months later, in May, a bombing at a market in Urumqi left 43 people dead, according to officials.

The unrest has horrified the Chinese. In an effort to highlight the Uighur violence, Chinese officials started NBC News’ tour in Xinjiang with a presentation on terrorism, documenting each attack they say was perpetrated by the Muslim minority.

Surveillance has been stepped up throughout the region, as in the whole country. Police checkpoints and facial recognition-equipped security cameras are pervasive in the area. Muslims are only allowed to pray at state-sanctioned mosques.

The camp directors defended their centers and said that conditions were comfortable for the Uighurs there.

Mijiti Maihemuti, the director of Kashgar's vocational education and training center, said conditions at his facility are "very good." NBC News

“The conditions of our accommodations are very good,” said Mijiti Maihemuti, director of Kashgar's vocational education and training center. “There are six people living in a room. There is air conditioning, TV, wardrobes, etc. We provide all these to our students free of charge.”

The U.S. government has taken an increasingly hard line against China’s treatment of the Uighurs and has weighed sanctions against senior Chinese officials in Xinjiang, including the autonomous region’s Communist Party chief, Chen Quanguo, who is in the upper echelons of China's leadership.

On Wednesday, Secretary of State Mike Pompeo condemned China’s treatment of Uighurs.

"When the state rules absolutely, it demands its citizens worship government, not God. That's why China has put more than 1 million Uighur Muslims ... in internment camps," he said during a Vatican conference on religious freedom. "When the state rules absolutely, God becomes an absolute threat to authority."

Sen. Marco Rubio, R-Fla., sponsored a bill calling for tough action against China over the treatment of the Uighurs. He has accused Beijing of “putting kids in state-sponsored orphanages, stripping them of their names, stripping them of their ethnic and religious identity.”

“Totalitarian governments are very good at orchestrating and stagecraft,” he said. “They control 100 percent this region. They control who gets to speak, and who gets to say, and what you get to see.”

Chinese officials deny accusations that the camps shown to the media are staged. And regardless, they say, the policies toward the Uighurs are working.

Uighur people learn practical skills at an education camp in Xinjiang, China. Keir Simmons / NBC News

“Through the measures we have taken in recent years, Xinjing is a stable, prosperous society, which should not be taken for granted,” said Xu Guixiang, deputy head of publicity for the Communist Party of China, Xinjiang Committee.

"This proves that our measures are effective.”