Beijing urged Washington to respect China's sovereignty, and immediately stop meddling in its internal affairs, the Chinese embassy in the U.S. said in a statement on its website in response to State Department comments.

State Department deputy spokesperson Vedant Patel said on Tuesday that U.S. believes the new national security bill has the potential to accelerate the closing of a once open society.

Patel said the crimes outlined in the legislation are poorly defined and incredibly vague and that Washington is analyzing the potential risks to U.S. citizens and American interests.

Others including Britain, Canada, the European Union and United Nations have lined up to raise concerns about the bill that will take effect from Saturday.

The Chinese embassy said the bill "punishes a very small number of criminals who endanger national security and protects the vast majority of law-abiding Hong Kong residents", adding that normal activities of foreign organisations, enterprises and personnel are fully protected by law.

The package, known as Article 23, punishes offences including treason, sabotage, sedition, the theft of state secrets, external interference and espionage with sentences ranging from several years to life imprisonment.

(Reporting by Liz Lee and Shanghai newsroom; Editing by Kim Coghill)