Hong Kong democracy activist Agnes Chow described prison as "agony" on Saturday after she was released on the second anniversary of the city's huge democracy rallies, with police out in force and protests now all but banned.
Two thousand officers have been placed on standby after social media calls for residents to commemorate the failed democracy demonstrations.
Authorities have kept a coronavirus prohibition on public gatherings, despite the city recording just three local infections in the last month.
A Beijing-imposed national security law has also criminalised much dissent and most of the city's democracy leaders have been arrested, jailed or fled overseas.
On Saturday morning, one of those figures walked free.
Chow, 24, was mobbed by waiting media but opted for a quiet exit, making no comment.
Instead, she wrote a short Instagram post after her release.
"The... agony is finally over," she wrote, adding that she intended to rest after becoming "weak" while behind bars.
Chow hails from a generation of activists who cut their teeth in politics as teenagers and became an inspiration for many chafing under Beijing's increasingly authoritarian rule.
She spent around seven months behind bars for her role in a 2019 protest outside the city's police headquarters. Fellow youth activists Joshua Wong and Ivan Lam were sentenced in the same case.
Chow's release comes at a sensitive time.
Two years ago on June 12, thousands of protesters surrounded the city's legislature in an attempt to stop the passage of a bill that could have allowed extraditions to mainland China's opaque judicial system.
Riot police used tear gas and rubber bullets to disperse the huge crowds.
Footage of the clashes deepened public anger, fuelling what became an increasingly violent movement calling for full democracy that raged for seven straight months.
Huge crowds rallied week after week in the most serious challenge to China's rule since Hong Kong's 1997 handover.
Beijing's leaders have dismissed the call for democracy, portraying those who protested as stooges of "foreign forces" trying to undermine China.
They have since overseen a sweeping crackdown that has successfully curbed dissent and radically transformed the once outspoken semi-autonomous city.
The spear tip of that crackdown is the national security law.
More than 100 people have been arrested under the new law, including Chow.
She has not yet been charged but dozens of others have, including jailed pro-democracy media tycoon Jimmy Lai.
Most have been denied bail and they face up to life in jail if convicted.
Protests have been all but illegal for the last year in Hong Kong but anniversary events can focus attention.
On Friday, two activists from Student Politicism were arrested on suspicion of advertising an unauthorised assembly.
The pro-democracy group had planned to staff a street booth on Saturday night.
In a statement the group's secretary Chan Chi-sam said Hong Kong had fallen into an "absurd era", adding that he hoped Hong Kongers would "continue to speak out and not be pushed into cowardice or silence."
Last week Hong Kong authorities banned an annual candlelight vigil commemorating victims of Beijing's deadly 1989 Tiananmen Square crackdown.
But many Hong Kongers still quietly signalled defiance by turning on mobile phone lights and lighting candles that evening.
On Saturday afternoon police kept up a strong presence in the same shopping districts where last week's protests took place.
Saturday's anniversary was also marked overseas -- including by many Hong Kong democracy activists who have chosen self-exile over likely prison sentences back home.
In Tokyo, more than two hundred protesters dressed in black gathered at Shinjuku Central park holding yellow umbrellas -- a symbol of Hong Kong's democracy movement -- and waved flags reading "Liberate Hong Kong, revolution of our times".
'Enemies of Hong Kong'
Western nations say China has torn up Hong Kong's "One Country, Two Systems" model -- a pre-handover promise that the city would keep key freedoms and autonomy.
China's leaders say the security law was needed to restore stability.
As Chow was being released, Beijing's top envoy in Hong Kong was speaking to hundreds of dignitaries at an event themed around next month's 100th anniversary of the founding of the Chinese Communist Party.
Luo Huining hit out at western media coverage, international criticism and those who "cry for the end of one-party rule" -- a popular pro-democracy slogan in Hong Kong.
"They are the real enemies of Hong Kong's prosperity and stability," Luo said.