A city in China's far-western Xinjiang region has ordered people who are "poisoned by extremism, terrorism and separatism," in contact with overseas terror groups or act in a conservative Islamic manner, to turn themselves in to authorities.

Those who surrender to judicial organs within 30 days and confess to their crimes will be treated leniently and might avoid punishment, said a notice posted Sunday on the official social media account of the municipal government of Hami.

Beijing has in recent months faced an outcry from activists, academics and foreign governments over mass detentions and strict surveillance of the Muslim Uighur minority and other ethnic groups that live in Xinjiang.