Tens of thousands of demonstrators in Hong Kong have defied a ban to stage a mass vigil for the victims of the 1989 Tiananmen Square crackdown in Beijing.
Officers erected barricades around the city's Victoria Park, but some pro-democracy protesters knocked them down and held candlelit gatherings.
Police banned the vigil this year, citing coronavirus measures.
Earlier, lawmakers approved a controversial bill making it a crime to insult China's national anthem.
Ahead of the vote, two legislators were taken away by security guards after throwing a foul-smelling liquid on to the chamber floor.
They said they were protesting against China's growing control over Hong Kong, and also marking the Tiananmen Square anniversary.
The latest events come as the Chinese government is drawing up a new security law for Hong Kong, a move that threatens to raise tensions even further.
Why was the Tiananmen vigil banned?
Hong Kong and Macau are the only parts of China that have been allowed to mark the killings.
An annual vigil has been held in Hong Kong since 1990. On the mainland, references to the crackdown are banned, and the government mentions it rarely - if at all.
On 4 June 1989, troops and tanks opened fire on pro-democracy protesters in Beijing - estimates of the dead vary from a few hundred to several thousand.
Tens of thousands of people normally mark the anniversary in Hong Kong, but police told local media that 3,000 riot officers would be deployed to stop smaller or impromptu commemorations.
At Victoria Park, demonstrators shouted pro-democracy slogans including "Stand with Hong Kong" and "End one-party rule", referring to the Communist Party's monopoly on power in China.
"I've come here for the vigil for 30 years in memory of the victims of the June 4 crackdown, but this year it is more significant to me," one 74-year-old man told AFP news agency.
"Because Hong Kong is experiencing the same kind of repression from the same regime, just like what happened in Beijing."
Candlelit vigils also took place in other parts of Hong Kong. Hundreds gathered in Mong Kok district, where there were brief scuffles between protesters who attempted to set up barricades and police who used pepper spray to disperse them, Reuters reported.
It was the first time there had been unrest at a Tiananmen vigil in Hong Kong, the news agency said. Police said they had made several arrests.
In Mong Kok, Brenda Hui held a white battery-illuminated umbrella that read "Never Forget June 4".
"We are afraid this will be the last time we can have a ceremony but Hong Kongers will always remember what happened on June 4," she said.
Groups of up to eight are allowed to gather in Hong Kong under the territory's virus rules. But police sources told the South China Morning Post that if different groups gathered for a "common purpose", they would be moved on.
The US and Taiwan have both called on China to apologise for the Tiananmen crackdown.
"Around the world, there are 365 days in a year. Yet in China, one of those days is purposely forgotten each year," Taiwan's President Tsai Ing-wen tweeted. Secretary of State Mike Pompeo tweeted a photo of him meeting prominent Tiananmen survivors.
China's foreign ministry said the calls were "complete nonsense".
"The great achievements since the founding of new China over the past 70 or so years fully demonstrates that the developmental path China has chosen is completely correct," spokesman Zhao Lijian told reporters.
Will the vigil happen next year?
Grace Tsoi, BBC World Service, Hong Kong
Hong Kong's candlelight vigil commemorating Tiananmen has always been a very organised affair, involving electric screens and professional sound equipment. There would be many speeches and flower tributes.
Not this year. Metal barriers blocked the football pitches at Victoria Park, until people removed them to gain access.
Despite the ban, tens of thousands still flocked to the park with a sense of urgency.
"The national security law will be passed and our freedom of assembly is disappearing. But we can't let history be forgotten," said Amy, who is in her late 20s. She was attending the vigil for the first time.
At 20:00 local time, the people observed a moment of silence with a white candle or a mobile phone light.
Slogans ranging from "liberate Hong Kong, revolution of our times" and even "one Hong Kong, one nation" were chanted.
Many question whether the vigil will be allowed in the future.
What is the national anthem bill?
The new law carries penalties of steep fines and up to three years in prison for anyone who shows disrespect to China's national anthem, the March of the Volunteers.
It also requires that schoolchildren in the territory be taught the anthem and its history.
Many in Hong Kong see it as another move by Beijing to impose its will and weaken the region's "one country, two systems" policy.
The bill was passed by 41 votes to one in the Legislative Council - Hong Kong's parliament - on Thursday, despite attempts by opposition members to disrupt it. Pro-democracy legislators abstained from voting, the South China Morning Post reported.
In recent years, the Chinese anthem has frequently been booed before matches involving the Hong Kong football team. Many fans have instead sung Glory to Hong Kong, which has become a rallying cry for pro-democracy activists.
What is the proposed security law?
The Chinese government wants a new security law for Hong Kong, which would make it a crime to undermine Beijing's authority.
The law could also see China installing its own security agencies in the city for the first time.
Critics fear the law would further erode Hong Kong's freedoms.
They also fear the bill could mean no more Tiananmen Square vigils in Hong Kong - even after the virus threat has eased.
The draft law was passed by China's rubber-stamp parliament, the National People's Congress, and is expected to come into force by September.
The proposal sparked renewed protests in Hong Kong. When the government last tried to introduce a national security law in 2003, it backed down after public anger.