Kazakhstan’s government is facing growing popular resentment against China, one of its major economic partners, as accounts emerge of Chinese-Kazakhs and Kazakh nationals being sent to “political re-education camps” in China’s Xinjiang region.

In a widely followed case, a Kazakh court on Wednesday allowed an illegal Chinese immigrant to stay in the country after she gave details about an indoctrination centre in Xinjiang where she had been employed. “In China, they call it a political camp. Officially, this is a training centre where people study Chinese ideology. But in reality, it’s a prison in the mountains,” Sayragul Sauytbay, a Chinese of Kazakh ethnicity, told a court hearing in July, Radio Free Europe/Radio Liberty reported.

Sauytbay said she worked in one of several such camps for Chinese-Kazakh people that held 2,500 detainees. Accounts of the trial and images of groups of supporters outside the court have been shared hundreds of times on social media in the last few days.

Kazakhstan, a key partner in China’s Belt and Road Initiative, has been accused of deporting Uygur asylum seekers back to China, but activists believe popular support received by Sauytbay prior to the ruling helped her to receive a more lenient ruling. “Public opinion was very influential,” said the Kazakhstan International Bureau for Human Rights and Rule of Law, a local NGO that has been campaigning to prevent Sauytbay’s deportation.

Inside the camps where China tries to brainwash Muslims until they love the party and hate their own culture

A spokesperson for the Ministry of Foreign Affairs of Kazakhstan declined to comment on the ruling.

In the last few months, similar accounts have detailed how Kazakh citizens and Chinese-Kazakhs have been involved in the ongoing political campaign in Xinjiang, fuelling discontent against the Chinese government.

Omir Bekali, a Kazakh citizen, said in May he had been detained without trial for eight months in China, and that he spent part of his ordeal in a re-education camp where prisoners were asked to criticise the Islamic religion, praise the Communist Party and receive lectures on the dangers of separatism and extremism. Tens of thousands of people are reportedly interned in such camps.

Aziz Burkhanov, an expert on identity issues in Astana’s Nazarbayev University, warned that news about indoctrination camps in Xinjiang is creating “a new cycle of anti-Chinese sentiment”, especially among Kazakh-language media outlets.

Central Asia’s answer to Dubai? In Kazakhstan’s Astana, reality bites

Around 1.2 million ethnic Kazakhs live in Xinjiang. In recent years, thousands have become citizens of Kazakhstan under a government programme to encourage the Kazakh diaspora to return to the country, but still maintain family and business ties in China and travel across the border frequently.

“Cases of ethnic Kazakhs detained in China are discussed widely on social media, and activists even [wrote a] collective letter to the president to ask for political asylum [for illegal immigrant Sauytbay]. These kind of demands are growing, and have generated a sinophobic mood in the society,” said Torokul Doorov, director of the Kazakh service of US-funded Radio Free Europe/Radio Liberty, based in Prague, Czech Republic. “It puts the government in a very tight spot.”

Mistrust of China has shaken Kazakh politics in the past. In 2016, the country experienced the biggest demonstrations in years, calling for the government to stop nationwide land reforms. Protesters feared the extension of leases for foreigners could lead to Chinese investors taking control of important swathes of land.

“There is this fear that China will dominate Kazakhstan,” said Burkhanov.

For the moment, the Kazakhstan government seems to be quietly raising the issue of the detentions through diplomatic channels.

China and Kazakhstan sign $2 billion in deals as Xinjiang party chief visits the Central Asian nation

“They think that the best approach with the Chinese government is to work behind the scenes to resolve this issue … but the fact that they make these comments, and that you see reports of them raising those issues at bilateral meetings at an official level means that this is an issue of great concern,” said Raffaello Pantucci, an expert on China’s foreign policy at the Royal United Services Institute, a think tank.

“We have negotiations through diplomatic channels on this issue,” confirmed Aibek Smadiyarov, spokesperson of Kazakhstan’s Ministry of Foreign Affairs. Smadiyarov said some of the cases involved people who didn’t “finish all procedures” when dropping their Chinese nationality to become Kazakhstan citizens, but declined to comment on the reports about political re-education camps in Xinjiang.

According to the Kazakhstan International Bureau for Human Rights and Rule of Law, weeks after raising the cases of at least two Kazakh nationals detained in China to the Ministry of Foreign Affairs, several prisoners were released and returned to the country.

The negative public opinion is in contrast to Kazakhstan’s deepening economic engagement with China. Russia is still the main trade partner of Kazakhstan, but China is already the main destination of its exports. In 2016, the country exported US$4.6 billion of goods from Kazakhstan, mainly raw materials, such as petroleum and copper, according to MIT’s Observatory of Economic Complexity.

Kazakhstan is where President Xi Jinping first laid out his plans to revive the historical Silk Road in September 2013. Beijing and Astana have since signed several agreements to develop the region.

A 2017 PricewaterhouseCooopers study argued that Kazakhstan was set “to gain significantly as the geographic centrepiece” of the new land route for the revived Silk Road. In particular, it pointed to the US$3.5 billion investment in Khorgos Eastern Gate, a dry port close to the border with China.

China’s one belt, one road plan covers more than half of the population, 75 per cent of energy resources and 40 per cent of world’s GDP

The two governments have agreed to implement 51 projects totalling US$27.7 billion. These include five projects on which construction is to start this year and involve US$623 million of Chinese capital.

“Because of these economic interests, the Kazakhstan government can’t simply spit it out, they can’t say much on the issue as they have a certain economic dependency on China,” said Hak Yin Li, an international relations experts at the Chinese University of Hong Kong.

The country is part of the China-led Shanghai Cooperation Organisation, an alliance between China and Central Asian nations that includes an agreement not to interfere with other states’ internal affairs.

“They can’t question what is going on in China and they expect their neighbours to do the same,” said Pantucci.

But, with the heat rising in Xinjiang, the Sauytbay case shows just how difficult it might get for the government to ignore public opinion.