Hong Kong has taken the unprecedented step of banning a pro-independence party, invoking a colonial-era "national security" law for the first time since Britain handed over control of the territory to China in 1997.

The Hong Kong National Party was born out of the huge 2014 protest movement against the perceived erosion of Hong Kong's autonomy from Beijing.

Authorities said the party was prepared to use "all methods" to forge independence, and in doing so posed a threat to security and broke the Basic Law, a mini-constitution governing Hong Kong's "one country, two systems" relationship with China.

The ban was announced on Monday in a brief statement in the government's official gazette. Security minister John Lee issued the order under a little-known colonial-era regulation requiring all social groups and organisations to register with the police.

The "Societies Ordinance" law also allows the government to ban groups "in the interests of national security, public order or the protection of the rights and freedoms of others".

Mr Lee told reporters he could not rule out further action against other groups, including those promoting "self determination" as well as full independence.

The National Party "has a clear agenda in making Hong Kong a republic", he said. Mr Lee also said the group had spread "hatred and discrimination against mainland Chinese".

The party was founded in 2016, although its drive for full independence from China showed little sign of gaining mainstream popular support. But the announcement in July that the government was considering a ban propelled its leader, 28-year-old Andy Chan, to prominence.

Chan said in interviews at the time that police had approached him with documents detailing his speeches and activities since the party's formation.

"I will never stop in my pursuit of freedom, human rights, equality and dignity," he said.

Perceptions of growing influence from China have stoked tensions in recent years, sparked in 2014 by the decision by China's ruling Communist party to retain the right to effectively pre-screen candidates for Hong Kong's leadership.

The government has been exploring ways to crack down on the independence movement since a warning last year from President Xi Xinping, during a visit to the city, that any attempt to endanger China's sovereignty would cross a "red line".