THE Uighurs have never been particularly comfortable in China. Xinjiang, the region where these Turkic Muslims once formed the vast majority, came unwillingly into the Chinese empire. Rebels in parts of it even set up independent republics; a short-lived one was snuffed out by the Communist Party in 1949. Since then the regime in Beijing, 1,000 miles (1,600km) to the east, has sought to keep Xinjiang quiet. The policy is not working. The presidency of Xi Jinping risks sinking into a quagmire of ethnic strife. This could be China’s Chechnya.

Over the past few decades the party has used several tactics to assert control. First it encouraged massive migration of Han Chinese into Xinjiang from other parts of China. Later it poured money into infrastructure and beefing up industry; the jobs thus created have gone overwhelmingly to Hans, who now make up more than 40% of the province’s 22m people. In tandem the party has adopted a hard line towards the merest hint of dissatisfaction on the part of the Uighurs.

Discontent is spilling into the open, nonetheless. The past few days have been the bloodiest in Xinjiang since clashes in the provincial capital, Urumqi, left around 200 dead in 2009. It appears that nearly 100 people died in the violence. The dead include 59 alleged terrorists gunned down by police near Kashgar, the main city in southern Xinjiang, where the Uighurs are concentrated (and where the economy is weakest). These Uighurs had apparently attacked police stations and Han Chinese. Two days later a pro-government imam was stabbed to death outside the city’s main mosque (see article).

Whenever violence flares up, the government’s rhetoric is uncompromising and usually focused on the dangers of jihadism. In May, following a spate of attacks by Uighurs on government and civilian targets in Xinjiang and in other parts of China, Mr Xi demanded “walls made of copper and steel” and “nets spread from the earth to the sky” to catch the “terrorists”. The party blames such attacks on Islamist militancy seeping across the border from Central and South Asia—notably from Afghanistan and Pakistan. It likes to claim that Uighurs live in harmony with the Han Chinese (“tightly bound together like the seeds of a pomegranate”, as Mr Xi puts it).

The tragedy is that the government could end up proving itself right—by making jihadism the core of the Uighurs’ militancy. For now the violence is fuelled principally by a welter of home-grown grievances and is strikingly amateurish: rarely are the perpetrators armed with anything more than knives. But in recent months the violence has been morphing, spreading beyond the region itself and taking on some of the hues of jihadism elsewhere—through suicide-attacks and indiscriminate killing of civilians.

Such acts are unspeakable. But there is evidence that China’s heavy-handed approach in Xinjiang is radicalising a once-tolerant culture. Uighur activists abroad say the latest violence near Kashgar had nothing to do with terrorism, for instance; instead it was sparked by police efforts to enforce government bans against fasting during Ramadan.

From Sudan to the West Bank, the evidence is clear: once religion enters any conflict, it becomes harder to settle. The parallel with Chechnya should scare Mr Xi. What started out as a nationalist uprising in Russia’s north Caucasus region in the 1990s was met by a brutal clampdown, which in turn spawned a violent Islamist movement. Since then Chechnya has been both a jihadist breeding-ground and a running sore for Russia.

About turn

There are hints that Mr Xi understands the problem. In May he convened a rare meeting of party bosses to discuss Xinjiang. That gathering recognised the need to boost employment among Uighurs, especially in southern Xinjiang. After the meeting state-owned enterprises in Xinjiang were told they had to hire at least a quarter of all staff from Uighur and other minorities. Education for Uighurs is another priority: work has just begun on Kashgar’s first full-scale university.

Such steps are necessary, but still not enough. Uighurs’ religious traditions should be respected, so that all Muslims are allowed to visit Mecca, not just those approved by the government. Education in the Uighur language could also be encouraged, as well as its use in workplaces. Mr Xi should disband the Xinjiang Production and Construction Corps, which runs a vast network of Han-dominated settlements.

And China should give up persecuting moderate Uighurs, who hardly embrace jihadism but are still angry about the government’s repressive measures. Amid the carnage of the past few days, the authorities announced they had formally charged a prominent Uighur economist, Ilham Tohti, with separatism. “Fewer and fewer people dare to speak out” about ethnic policies in Xinjiang, Mr Tohti has lamented. If Xinjiang’s Uighurs are not to fall prey to extremists, Mr Xi must allow people like Mr Tohti to speak out, not lock them away.