Suspects arrested by Beijing's new security office in Hong Kong could be tried on the mainland, a senior Chinese official said on Wednesday, a move certain to spark alarm in the Chinese-ruled city as a contentious new national security law takes effect.

Zhang Xiaoming, Executive Deputy Director of Beijing's Hong Kong and Macau Affairs Office, told reporters during a briefing that the mainland's national security office abides by Chinese law and that Hong Kong's legal system cannot be expected to implement the laws of the mainland.

"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.

Article 55 of the law states that Beijing's national security office in Hong Kong could exercise jurisdiction over "complex" or "serious" cases.

The news comes a day after Beijing unveiled the full details of the much-anticipated law amid weeks of uncertainty and confirms widespread fears it will be harsher than expected.

Under the law, mainland security agencies will be based in Hong Kong officially for the first time, with powers that go beyond the city's local laws.

Security was tight near the heart of Hong Kong's government district on Wednesday only hours after new security law came into force and as the city marked the 23rd anniversary of the former British colony's handover to China.

The contentious 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.

Among other details certain to rattle democracy and rights activists in the city is a ban on violators of the law standing for election and greater oversight of non-governmental organisations and news groups.

For highlights of the law, click

Speaking at a flag-raising ceremony to mark the anniversary of Hong Kong's handover in 1997, the city's embattled leader Carrie Lam said the law was the most important development since the city's return to Beijing.

"It is also an inevitable and prompt decision to restore stability in the society," 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.

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.

Critics fear the legislation will crush wide-ranging freedoms in Hong Kong denied to people in mainland China that are seen as key to its success as a global 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." For more analysts comments, click

HONG KONG'S 'SECOND RETURN'

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 of the restive city to heel.

Luo Huining, the head of Beijing's top representative office in Hong Kong, said at the flag-raising ceremony the law was a "common aspiration" of Hong Kong citizens.

Critics of the legislation blasted the lack of transparency surrounding its details up until it was unveiled, with even Beijing-backed Lam saying she was not privy to the draft despite her insisting most people had no reason to worry.

The complex legislation came into force at 11 p.m. (1500 GMT) on June 30, giving Hong Kong's 7.5 million people no time to digest it. Some pro-democracy activists quit their posts only hours before the law came into force, calling on the campaign for democracy to continue 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.

Critics of the law fear it will crush wide-ranging freedoms promised to Hong Kong for 50 years when it returned to Beijing under a "one country, two systems" style of governance.

Neighbouring Taiwan, which Beijing regards as part of China and has said it would use force to reclaim it, said it had opened an office on Wednesday to help people fleeing Hong Kong.

Authorities barred an annual handover anniversary march due to be held on Wednesday, citing a ban on gatherings of more than 50 people in a bid to curb coronavirus, but many activists pledged to defy the order and march later in the afternoon.

On July 1 last year, hundreds of protesters stormed the city's legislature to protest against a now-scrapped bill that would have allowed extraditions to mainland China, trashing the building in a direct challenge to authorities in Beijing.

Those protests evolved into calls for greater democracy, paralysing parts of the city and paving the way for Beijing to directly impose national security law on Hong Kong.