Hong Kong police fired teargas and water cannon to disperse thousands protesting against a plan to directly impose national security laws on the city, signalling a return to mass protests that hit the financial hub last year. 

Crowds thronged the bustling shopping district of Causeway Bay, where echoes of "Hong Kong independence, the only way out," and other slogans rang through the streets. 

The protest - the first since Beijing proposed national security laws on Thursday - poses a fresh challenge to Chinese President Xi Jinping as authorities struggle to tame public opposition to China's tightening grip over Hong Kong. 

The demonstrations come amid concerns over the fate of the "one country, two systems" formula that has governed Hong Kong since the former British colony's return to Chinese rule in 1997.

The arrangement guarantees the city broad freedoms not seen on the mainland, including a free press and independent judiciary. 

China's foreign minister Wang Yi told a press conference that the law was "imperative" after last year's protests "seriously endangered China's national security".

He told reporters that "violent and terrorist activities are continuing to escalate, (and) foreign forces have deeply and illegally interfered in Hong Kong affairs."

Today's rally, the largest since Covid-19 lockdowns began, was initially organised against a national anthem bill but the proposed national security laws sparked calls for more people to take to the streets. 

The city government sought to reassure the public and foreign investors over the security laws, that have sent a chill through financial markets and drawn a rebuke from foreign governments, human rights groups and some business lobbies. 

Police conducted stop-and-search operations in Causeway Bay and warned people not to violate a ban on gatherings of more than eight, imposed to curb the spread of coronavirus. 

They said protesters hurled umbrellas, water bottles and other objects at them and they responded with tear gas "to stop the violent acts of rioters." 

Some protesters used bins, traffic cones and other debris to set up road blocks, leaving key thoroughfares deserted. Police said more than 40 people were arrested. 

Many shops and other businesses closed early. 

The chaotic scenes evoked memories of sometimes violent anti-government protests in the city last year, drawing as many as two million people to one protest alone. 

China has dismissed other countries' complaints about the proposed legislation as "meddling," saying the proposed laws will not harm Hong Kong autonomy or foreign investors. 

In a bold challenge to the mainland authorities, a small group of democracy activists protested outside Beijing's main representative office in the city, chanting, "National security law is destroying two systems." 

Nearly 200 political figures from around the world said in a statement the proposed laws were a "comprehensive assault on the city's autonomy, rule of law and fundamental freedoms". 

The Chinese government's top diplomat said the proposed legislation would target a narrow category of acts and would have no impact on the city's freedoms nor the interests of foreign firms. 

Last year's anti-government protests plunged the city into its biggest political crisis in decades, battered the economy and posed the gravest popular challenge to President Xi since he came to power in 2012.