Chinese lawmakers on Sunday passed the first anti-terrorism law criticised by the US, which said the cyber provisions in the law restricts "the exercise of freedoms of expression".

All 159 members of the Standing Committee of the National People's Congress (NPC) voted in favour of the law on the last day of a week-long bimonthly session, the Xinhua News Agency reported.

China had provisions to counter terror threats in its Criminal Law, Criminal Procedure Law and Emergency Response Law, but never had a dedicated law to counter terrorism. NPC submitted the first draft of the Anti-Terror Law for review in October 2014 and second in February 2015.

The Anti-Terror Law requires telecom companies and Internet service providers to provide encryption keys, technical interface and the pass codes that help protect data to Chinese authorities. The law had attracted criticism from the West.

The US State Department had expressed "serious concerns" about the law, saying it would do more harm than good against the threat of terrorism, Reuters reported. The US had also raised concerns about basic human rights.

"We believe the draft Counterterrorism Law would lead to greater restrictions on the exercise of freedoms of expression, association, peaceful assembly, and religion within China," US State Department spokeswoman Gabrielle Price had said on Tuesday.

Chinese Foreign Ministry spokesman Hong Lei had hit back at the US, saying the law would not restrict citizens' freedom of expression online. "We demand that the US stop its unfounded accusation," Global Times quoted Hong as saying.

Li Wei, a counter-terrorism expert at the Chinese Institutes of Contemporary International Relations, also rubbished the US' claims and said: "It fails to separate extremism from normal religious activity and blurred the issue with freedoms of speech and religious belief".

"The law aims to safeguard the well being and property of every Chinese citizen, which is the most important thing to do. And even in the US, comments and activities provoking violence and extremist activities will be restricted and countered," Li had told Global Times.