Beijing will expand its counterterrorism apparatus and tech companies will have to hand over encryption keys on demand to security agencies following the adoption of the country’s first anti-terror law on Sunday. The law, which goes into effect on January 1, also allows the People’s Liberation Army to take part in counterterrorism operations overseas, providing the missions are approved by the Central Military Commission and the countries involved. A state-level leading group on counterterrorism will be established and governments of and above the city level will also need to set up affiliated agencies. The law was passed unanimously by the National People’s Congress Standing Committee. One provision requires technology companies to share encryption keys and back-door access with state security agents seeking to prevent or investigate terrorists acts. Critics said the law would threaten freedom of expression and intellectual property rights. US President Barack Obama said in March he raised his concerns about the law with his Chinese counterpart Xi Jinping. But Chinese officials said on Sunday the requirement was necessary, and lawmakers had already taken the need to protect business interests into account. READ MORE: China on IS threat: Could government launch anti-terrorism cooperative in absence of global unified force? Li Shouwei, deputy head of the criminal law division of the NPC Standing Committee’s legislative affairs commission, said similar requirements were in place in other countries. “The rule accords with the actual need to fight terrorism and is basically the same as those in other major countries around the world,” Li said. With a better legal framework, the coordination and planning of counterterrorism work in China can improve Li Wei, an analyst at the China Institutes of Contemporary International Relations. The law’s passage comes amid heightened concerns about violence in Xinjiang and reports of Uygurs going to Syria to fight with Islamic State militants. China previously did not have a specific counterterrorism law, although related provisions were part of the Criminal Law, Criminal Procedure Law and Emergency Response Law. Experts said the legislation could give agencies a clear legal definition within which they could exercise their power. “With a better legal framework, the coordination and planning of counterterrorism work in China can improve,” said Li Wei, an analyst at the China Institutes of Contemporary International Relations. READ MORE: Having lost lives, China must boost its role in fighting global terrorism Retired colonel Yue Gang said the military should be involved in overseas missions if there were threats in other countries that affected China. “But we should do it without affecting the sovereignty of other nations,” Yue said. Rohan Gunaratna, head of the International Centre for Political Violence and Terrorism Research at Nanyang Technological University in Singapore, said China faced a significant threat from terrorism. “The law is created in anticipation of the emerging threat and to manage the current threat,” he said. He said China should join military actions against IS, improve domestic capacity to combat terror and build close ties with the Muslim community at home.