Hong Kong's top court is set to hand down a judgment on Tuesday in the first legal challenge to Beijing's sweeping national security law, deciding whether media tycoon Jimmy Lai can be granted bail.
The landmark case puts the city's independent judiciary on a potentially precarious collision course with China's authoritarian leadership as Beijing seeks to snuff out dissent in the restless financial hub.
Lai, the 73-year-old owner of pro-democracy tabloid Apple Daily, is one of more than 100 activists arrested under the law since it was enacted in June, and the highest-profile figure to be incarcerated.
He has been charged with "colluding with foreign forces" -- one of the new security crimes -- for allegedly calling for sanctions against Hong Kong and China.
The security law is the most dramatic shift in Hong Kong's relationship with China since it was handed back by Britain in 1997.
It criminalised a host of political views and toppled the legal firewall between the two territories.
Written in Beijing and imposed by fiat, it allows mainland security agents to operate openly in the city for the first time, and even grants China jurisdiction in some cases.
Tuesday's judgment centres around bail.
Presumption of bail being granted for non-violent crimes is a hallmark of Hong Kong's independent common law system.
But the national security law removes that presumption.
Instead, it states "no bail shall be granted to a criminal suspect or defendant unless the judge has sufficient grounds for believing that (they) will not continue to commit acts endangering national security".
Lai was detained in December and released on bail for about a week after a lowered court granted him HK$10 million (US$ 1,290,000) bail together with a stringent list of requirements, including house arrest, no interviews or social media posts.
But he was put back behind bars days after the prosecution sought to challenge the bail decision.
A panel of top judges will now have to balance the wording of Beijing's law against the city's common-law traditions, its mini-constitution and its Bill of Rights, which supposedly guarantee freedom of speech and a presumption of bail for non-violent crimes.
Legal analysts say the outcome will give an indication of whether Hong Kong's judiciary will serve -- or even can serve -- as any kind of constitutional brake against Beijing's security law.
The judiciary is in a precarious position.
In Hong Kong's complex constitutional hierarchy, the ultimate arbiter of the laws is Beijing's Standing Committee, which has shown an increased willingness in recent years to wade into legal arguments and make pronouncements.
China's state media have already declared Lai guilty and made clear authorities expect Hong Kong's judges to side with Beijing on national security.
Senior Chinese officials have recently backed calls to "reform" Hong Kong's judiciary, something opponents fear signals support for a more mainland-style legal system that answers to the Communist Party and where convictions are all but guaranteed.