Hong Kong's leader on Wednesday hailed a sweeping national security law imposed by Beijing as the "most important development" since the city was handed back to China.

"The legislation of the national security law is considered the most important development in relations between the central government and Hong Kong since the handover," Chief Executive Carrie Lam told dignitaries at a ceremony marking the 23rd anniversary of the city's return to Chinese rule.

"The national security law is a turning point for Hong Kong from chaos to being governed well," she added.

Lam was speaking a day after China unveiled the law to semi-autonomous Hong Kong's 7.5 million residents, a historic move decried by many Western governments as an unprecedented assault on the finance hub's liberties and autonomy.

It outlaws subversion, secession, terrorism and colluding with foreign forces to undermine national security with sentences of up to life in prison.

The new suite of powers radically restructures the relationship between Beijing and Hong Kong, toppling the legal firewall that has existed between the city's judiciary and the mainland's party-controlled courts.

China will have jurisdiction over "serious" cases and its security agencies will also be able to operate publicly in the city for the first time, unbound by local laws as they carry out their duties.

Twenty-seven countries, including Britain, France, Germany and Japan, urged Beijing to "reconsider the imposition" of the legislation, saying in a statement to the UN Human Rights Council that it "undermines" the city's freedoms.

The United States has threatened new countermeasures.

But Lam — a pro-Beijing appointee — rejected concerns the law will end Hong Kong's freedoms.

In her speech on Wednesday, she said the law "will not undermine Hong Kong's judicial independence and high degree of autonomy, and won't affect the Hong Kong people's freedoms and rights."

She described criticism of the law by foreign governments as "smearing and vicious attacks" and she thanked China's leaders for keeping faith in her after last year's huge and often violent pro-democracy protests.

Hong Kong's tumultuous path to the national security law
Hong Kong (AFP) June 30, 2020 –

As part of the 1997 handover from Britain, China agreed to guarantee Hong Kong certain freedoms — as well as judicial and legislative autonomy — for 50 years in a deal known as "One Country, Two Systems".

Beijing says that promise is still being respected even after Tuesday's move to impose a secretive national security law on the restless city.

Critics, rights groups and some Western nations say the legislation is just the latest step by China to chip away at the city's civil liberties over the years.

Here is a timeline of how that tension has unfolded:

– 2003: First security law attempt

The first major protests to hit Hong Kong after the handover were sparked by the local government's attempt to pass a national security law.

Article 23 of the Basic Law — Hong Kong's mini constitution — says the city must create a law prohibiting "treason, secession, sedition (and) subversion".

But the law was never implemented due to public fears it would curtail the city's similarly constitutionally guaranteed free speech laws.

Half a million took to the streets. The bill was shelved and then city leader Tung Chee-hwa eventually stepped down.

– 2012: Education reform

A period of comparative political calm followed.

But in 2012, an attempt to usher in more patriotic classes sparked student protests.

Led by then 15-year-old activist Joshua Wong, tens of thousands of students, parents and teachers rallied against the plan which was eventually scrapped.

– 2014: No universal suffrage

Article 45 of Hong Kong's Basic Law stipulates that the "ultimate aim" is for the city's leader to be selected by "universal suffrage".

But this promise has never been fulfilled.

In 2014, Beijing offered its version of universal suffrage — Hong Kongers would be able to choose from a small group of pre-vetted candidates.

The announcement sparked a 79-day occupation of major thoroughfares known as the "Umbrella Movement".

– 2015: Disappearing booksellers

Under "One Country, Two Systems" Hong Kong polices itself.

But the disappearance into mainland custody of five people working for a bookstore publishing salacious titles about China's leaders ignited fears Beijing's security services had abandoned that principle.

The booksellers later appeared on TV in mainland China admitting to a variety of crimes.

A billionaire businessman also disappeared in 2016, and later surfaced in mainland custody charged with corruption.

– 2016/17: Lawmakers disqualified –

Between 2016 and 2017, it became clear certain political views would no longer be allowed.

Two pro-independence and four pro-democracy lawmakers were disqualified from Hong Kong's legislature for changing their oaths of office to protest Chinese rule.

In a rare interpretation of the Basic Law, Beijing said any oath taker who was not "sincere and solemn" manner should be disqualified.

– 2019: Extradition bill

In 2019, the Hong Kong government tried to fast-track a bill through the city's partially elected legislature that would have allowed extraditions to China's Communist Party-controlled courts.

The move sparked the biggest protests Hong Kong had witnessed since the handover.

Millions took to the streets during seven months of unrest while a smaller section of hardcore protesters frequently battled police in often-violent confrontations that saw more than 9,000 arrested.

The movement soon morphed into a new call for democracy and police accountability.

– 2020: National security law –

In a bid to quell protests, Beijing passed a national security law for Hong Kong on Tuesday in an unusually speedy and opaque process.

The law bypassed Hong Kong's legislature entirely. The city's 7.5 million inhabitants were not shown details of the law even as it was passed.

A summary published by China's official Xinhua news agency Xinhua this month said the legislation would cover subversion, secession, terrorism and colluding with foreign forces.

China's security agencies will be able to set up shop publicly in the city for the first time.

And Beijing will have jurisdiction over some cases, toppling the legal firewall that has existed between Hong Kong and mainland courts.