China adopted its first counterterrorism law on Sunday after early drafts of the bill attracted strong criticism for provisions that may tighten media controls and threaten the intellectual property of foreign firms. The legislation comes as Beijing wages a hard-hitting campaign to stamp out ethnic violence in its Xinjiang region and tries to tighten control over political dissent online and on the ground. It is the "latest attempt to address terrorism at home and help maintain world security," said the official Xinhua news agency. Details of the bill, which was approved by the standing committee of the rubber-stamp legislature the National People's Congress, were not immediately available. Xinjiang, home to the mostly Muslim Uighur ethnic minority group, has been plagued by unrest in recent years, prompting China to launch a police crackdown on separatist "terrorists" it says are behind the violence. In an attempt to control online communications which the government says have contributed to the violence, drafts of the new law have included provisions which could require tech firms to install "back doors" in products or turn over encryption keys to Beijing. Both are seen as potential threats to freedom of expression and to intellectual property. The law has attracted deep concern in Western capitals, not only because of worries it could violate human rights such as freedom of speech, but because of the cyber provisions. US President Barack Obama has said that he had raised concerns about the law directly with Chinese President Xi Jinping. Speaking after China's largely rubber-stamp parliament passed the law, Li Shouwei, deputy head of the parliament's criminal law division under the legislative affairs committee, said China was simply doing what other Western nations already do in asking technology firms to help fight terror. "This rule accords with the actual work need of fighting terrorism and is basically the same as what other major countries in the world do," Li told reporters. This will not affect the normal operation of tech companies and they have nothing to fear in terms of having "backdoors" installed or losing intellectual property rights, he added. Officials in Washington have argued the law, combined with new draft banking and insurance rules and a slew of anti-trust investigations, amounts to unfair regulatory pressure targeting foreign companies. China's national security law adopted in July requires all key network infrastructure and information systems to be "secure and controllable". The anti-terrorism law also permits the People's Liberation Army to get involved in anti-terrorism operations overseas, though experts have said China faces big practical and diplomatic problems if it ever wants to do this. An Weixing, head of the Public Security Ministry's counter-terrorism division, said China faced a serious threat from terrorists, especially "East Turkestan" forces, China's general term for Islamists separatists it says operate in Xinjiang. "Terrorism is the public enemy of mankind, and the Chinese government will oppose all forms of terrorism," An said. Rights groups, though, doubt the existence of a cohesive militant group in Xinjiang and say the unrest mostly stems from anger among the region's Muslim Uighur people over restrictions on their religion and culture. The new law also restricts the right of media to report on details of terror attacks, including a provision that media and social media cannot report on details of terror activities that might lead to imitation, nor show scenes that are "cruel and inhuman". — Agencies