“I AM not Chinese, I am Korean,” cried a frightened young woman as she was led away from demonstrators chanting anti-Chinese slogans near Istanbul’s Blue Mosque. Ultra-nationalists and Islamists were marching in solidarity with China’s Uighurs, who are Muslims and ethnic Turks, following reports of deadly clashes between students and police in Xinjiang province. The incident is the latest in a spate of anti-Chinese protests egged on by media coverage of the plight of the Uighurs. Across Turkey, protesters have burned China’s flag and effigies of Mao Zedong. (Mao died nearly 40 years ago, but is better known than China’s current president.) Last week a Chinese restaurant in Istanbul was vandalised to cries of Allahu Akhbar. It later emerged that the “Happy China” was run by Turkish Muslims and that its chef was Uighur. “We don’t even serve booze,” griped the owner.

Turkey’s government echoes the protesters’ complaints, albeit more diplomatically. The foreign ministry said that news of Uighurs being “banned from fasting and fulfilling other acts of worship had been received with sadness by the Turkish public.” Devlet Bahceli, leader of the far-right Nationalist Action Party, asked crudely: “How does one distinguish between Chinese and Koreans? Both have slanted eyes.”

China denies that it has banned the fast, but it certainly does curb Uighur culture and it tells bureaucrats, teachers and students not to observe Ramadan.

Still, Turkey’s ruling Islamists want to remain on good terms with Beijing. Unfazed by objections from NATO partners, Turkey is mulling the purchase of Chinese long-range surface-to-air missiles. The Turkish government has denied Rebiya Kedeer, a campaigner for Uighur independence, a visa. Ironically though, Uighurs travel via Turkey to join Islamic State jihadists in Syria, as Firdevs Robinson, a Turkish blogger, observes.

Recep Tayyip Erdogan, Turkey’s president, sees high strategic stakes. He says he would ditch efforts to join the European Union if Turkey were accepted by the Shanghai Co-operation Organisation (SCO), formed in 2001 by China, Russia, Kazakhstan, Kyrgyzstan, Uzbekistan and Tajikistan. The SCO “is better and more powerful, and we have common values with them,” Mr Erdogan declared.

If those values include squashing dissent, he has a point. At least 105 people have been indicted over the past year for alleged rudeness about the president. Mr Erdogan’s nervousness over a scandal implicating his son and sundry political allies has led to a shake-up in the judiciary and the police and to internet curbs.

He is expected to travel to Beijing on July 28th. And if this upsets any pious supporters, he can respond with a saying attributed to the Prophet Muhammad: “Seek knowledge, even in China.”