Dozens of people were arrested in Hong Kong, including a man carrying a pro-independence flag, after a new Beijing "anti-protest" law came into force, officials say.
The police used pepper spray to disperse some demonstrators gathered to mark 23 years since the end of British rule.
National security law targets secession, subversion and terrorism with punishments up to life imprisonment.
Critics say it impedes some freedoms that must be guaranteed by China.
Hong Kong's sovereignty was returned to China by Britain in 1997, under an agreement designed to protect certain freedoms for at least 50 years.
The annual pro-democracy march to mark the anniversary had been banned for the first time by the authorities, who cited an impediment to meetings of more than 50 people because of Covid-19.
The police confronted a small group of protesters gathered in the city center and at least 30 people were arrested for "illegal assembly, violating security law, obstructing the police and the possession of weapons".
Among the prisoners was a man carrying an "Independence of Hong Kong" flag – protesters were warned that certain slogans and banners could constitute serious crimes under the new law.
Previously, executive director Carrie Lam, the city's pro-Beijing leader, said the law "would restore stability" after widespread protests in 2019, saying: "The [new law] is considered the most important development in relations between the central government and Hong Kong since delivery ".
The legislation was widely condemned by countries such as the United States and the United Kingdom, as well as human rights activists and groups. US Secretary of State Mike Pompeo said: "[China] promised 50 years of freedom to the people of Hong Kong and gave them only 23. "
But a Chinese official was upset with foreign critics, asking them, "What does this have to do with you?"
"We Chinese will not be afraid of anyone," said Zhang Xiaming, from the State Council's Hong Kong and Macau Affairs Office. "Gone are the days when we had to follow the tips of others."
Hong Kong's new security law
What's going on on the birthday?
Some pro-democracy activists have pledged to defy the ban and march in the late afternoon. "We march every year … and we will continue marching," veteran Leung Kwok-hung told Reuters.
Photos on social media – confirmed by the police as genuine – showed a flag being used to alert protesters about the new law.
A pro-democracy activist warned that there was a "great chance of our being arrested".
"The charges will not be light, please judge for yourself," said Tsang Kin-shing, of the League of Social Democrats.
City police are on standby, experts told the South China Morning Post. They said about 4,000 police were ready to deal with any unrest.
What does the new law say?
Under the new law, crimes of secession, subversion, terrorism and collusion with foreign forces are punishable by a minimum sentence of three years, the maximum being life.
Protesters frequently targeted the city's infrastructure during the 2019 protests and, according to the new law, damaging public transport facilities can be considered terrorism.
Beijing will also establish a new security office in Hong Kong, with its own law enforcement personnel – none of whom would be under the jurisdiction of the local authority.
Inciting hatred for the central government of China and the regional government of Hong Kong are now offenses under Article 29.
The law can also be violated abroad by non-residents, under the terms of article 38. This could mean that foreigners can be arrested if they enter Hong Kong, if they are suspected of violating the new law.
Some critics feared that the law would apply retroactively – that is, to offenses committed before the law was passed – but Zhang said that would not be the case.
He added that suspects arrested in Hong Kong on charges of violating the law could be tried on the continent.
Activists keep quiet
Under national security law, many of the acts of protest that rocked Hong Kong last year can now be classified as subversion or secession … and punishable by life imprisonment.
Carrie Lam said the law was late. Political activists resigned and a pro-democracy protester, who asked to remain anonymous, told me that ordinary people were excluding posts on social media.
Many people are just stopping talking about politics and freedom and democracy, because they want to save their own lives. They want to save their freedom and avoid being arrested.
A contact of mine, a lawyer and human rights activist, sent me a message shortly after the law was passed. Please delete everything in this chat, he wrote
What reaction did the new law draw?
Pompeo said the "draconian" law destroys Hong Kong's autonomy ".
"Hong Kong has shown the world what a free Chinese people could achieve – one of the most successful economies and vibrant societies in the world," he said.
"But Beijing's paranoia and fear of the aspirations of its own people led to eviscerating the very basis of the territory's success."
Meanwhile, Canada has updated its travel advice for Hong Kong, saying: "You may be at greater risk of arbitrary detention for reasons of national security and possible extradition to mainland China".
Minutes after the law was passed on Tuesday, pro-democracy activists began to withdraw, fearing the punishment allowed by the new law.
"With broad powers and ill-defined laws, the city will become a secret police state," said Joshua Wong, a leading pro-democracy leader.
The political party he co-founded – Demosisto – was also dissolved.
An opposition lawmaker told the BBC that the measure had stripped the city of its rights.
"Our freedom is gone, our rule of law, our judicial independence is gone," said Ted Hui.
In the United States, lawmakers on both sides have launched a bill to give refugee status to Hong Kong residents at risk of persecution, local media reported.
The Taiwanese government has said it will create a special office to help people in Hong Kong face immediate political risks.