Hong Kong police moved swiftly against protesters on Wednesday, gearing up for the first rally since the introduction of sweeping security legislation.
On Tuesday Beijing unveiled the details of the contentious security law after weeks of uncertainty, making radical changes to the former British colony's way of life.
Hundreds of protesters gathered downtown for an annual rally to mark the 23rd anniversary of the colony's handover to China.
Riot police used pepper spray to arrest at least two people, while one metro train station closed.
Police, who earlier banned the rally, cited the law for the first time in confronting protesters and they also made their first arrest under it - a man holding a flag advocating independence
"You are displaying flags or banners/chanting slogans/or conducting yourselves with an intent such as secession or subversion, which may constitute offences under the ... national security law," police said in a message displayed on a purple banner.
The law will punish crimes of secession, subversion, terrorism and collusion with foreign forces with up to life in prison, heralding a more authoritarian era for the Asian financial hub.
China's parliament adopted it in response to months of pro-democracy protests last year triggered by fears that Beijing was stifling the city's freedoms, guaranteed by a "one country, two systems" formula agreed when it returned to Chinese rule.
Authorities in Beijing and Hong Kong have repeatedly said the legislation is aimed at a few "troublemakers" and will not affect rights and freedoms, nor investor interests.
But critics fear it will crush the freedoms that are seen as key to Hong Kong's success as a financial centre.
"With the release of the full detail of the law, it should be clear to those in any doubt that this is not the Hong Kong they grew up in," said Hasnain Malik, head of equity research, Tellimer in Dubai.
"The difference is that U.S. and China relations are far worse and this could be used as a pretext to impede the role of Hong Kong as a finance hub."
In Beijing, Zhang Xiaoming, executive deputy director of Beijing's Hong Kong and Macau Affairs Office, told reporters suspects arrested by Beijing's new security office in Hong Kong could be tried on the mainland.
He said the mainland's national security office abided by Chinese law and that Hong Kong's legal system could not be expected to implement the laws of the mainland. Article 55 of the law states that Beijing's national security office in Hong Kong could exercise jurisdiction over "complex" or "serious" cases.
Mainland security agencies will also be based in Hong Kong officially for the first time, with powers that go beyond city laws.
"The law is a birthday gift to (Hong Kong) and will show its precious value in the future," Zhang said, adding the law would not be applied retroactively.
On July 1 last year, hundreds of protesters stormed and vandalised the city's legislature to protest against a now-scrapped bill that would have allowed extraditions to mainland China.
Those protests evolved into calls for greater democracy, paralysing parts of the city and paving the way for Beijing's imposition of the law this week.
'Inevitable'
Speaking at a flag-raising ceremony to mark the handover anniversary, the city's Beijing-backed leader, Carrie Lam, said the law was the most important development since the city's return to Chinese rule.
"It is also an inevitable and prompt decision to restore stability," Lam said at the same harbour-front venue where 23 years ago the last colonial governor, Chris Patten, a staunch critic of the security law, tearfully handed back Hong Kong to Chinese rule.
Some pro-Beijing officials and political commentators say the law is aimed at sealing Hong Kong's "second return" to the motherland after the first failed to bring residents to heel.
Luo Huining, the head of Beijing's top representative office in Hong Kong, said at the ceremony the law was a "common aspiration" of Hong Kong citizens.
Critics denounced the lack of transparency surrounding the details of the legislation until it was unveiled. It came into force at 11pm on Tuesday.
Some pro-democracy activists gave up membership of their groups just before the law came into force, though calling for the campaign for democracy to go on offshore.
"I saw this morning there are celebrations for Hong Kong's handover, but to me it is a funeral, a funeral for 'one country two systems'," said democracy lawmaker Kwok Ka-ki.
Reuters