Police said they arrested more than 180 people on Sunday, when authorities fired tear gas and water cannon to disperse anti-government protesters as unrest returned to the Chinese-ruled city after months of relative calm.
"Terrorism is growing in the city and activities which harm national security, such as 'Hong Kong independence', become more rampant," Secretary for Security John Lee said in a statement.
"In just a few months, Hong Kong has changed from one of the safest cities in the world to a city shrouded in the shadow of violence," he said, adding national security laws were needed to safeguard the city's prosperity and stability.
In a return of the unrest that roiled Hong Kong last year, crowds thronged the streets of the city on Sunday in defiance of curbs imposed to contain the coronavirus, with chants of "Hong Kong independence, the only way out," echoing through the streets.
Calls for independence are anathema to Beijing, which considers Hong Kong an inalienable part of the country. The proposed new national security framework stresses Beijing’s intent "to prevent, stop and punish" such acts.
Agencies issuing statements in support of the legislation included the Commissioner of Correctional Services, and Hong Kong Customs.
Financial Secretary Paul Chan wrote on his blog on Sunday the national security law "itself" does not affect investor confidence, only the "misunderstanding" of it does.
“The central government has already said the law is targeted at the minority of people who are suspected of threatening national security and will not affect the rights of the general public.”
The United States, Australia, Britain, Canada and others have expressed concerns about the legislation, widely seen as a potential turning point for China's freest city and one of the world's leading financial hubs.
Taiwan, which has become a refuge for a small but growing number of pro-democracy protesters fleeing Hong Kong, will provide the people of Hong Kong with "necessary assistance", President Tsai Ing-wen said.