When two women wearing rainbow badges were beaten up by security guards in an arty part of Beijing last month, social media users quickly jumped in to fight their corner.
China's LGBT community may not get much support from authorities, but in a sign of growing tolerance in Chinese society, people are using the power of hashtag campaigns to denounce attacks on gays and lesbians.
The two women were walking in Beijing's trendy "798" district days before the May 17 International Day against Homophobia, Transphobia and Biphobia when they were suddenly surrounded and beaten by a group of black-clad security guards.
A video showing one of the women being knocked to the ground went viral online under the hashtag #798beating, with users expressing their outrage over the violence.
Days later, the security company apologised to the women and promised to dismiss three guards, according to prominent activist Lu Pin.
The public shaming and subsequent apology came weeks after China's popular Weibo microblogging platform faced intense criticism for censoring gay content, with the hashtag #IamGay viewed 240 million times.
Weibo reversed course within days - an unusual concession for the social network.
And in another incident that caused an online storm, a man in the southwestern city of Chengdu said his boss had punched his mother and used a homophobic slur against him after she had confronted the executive for sacking her son.
The groundswell of public support for the LGBT community may have alarmed Chinese Communist Party authorities, said Australian National University criminologist Borge Bakken.
"President Xi Jinping's regime is very nervous about everything. So they are cracking down on LGBT events, not particularly because these people are gay, but because they see their organising as a potential threat," the China specialist told AFP.
In May, the Canadian embassy in Beijing flew two large rainbow flags in solidarity with the global LGBT rights movement.
But outside diplomatic property, displaying the banner is not so easy in a country where homosexuality was still considered a crime 21 years ago and a mental illness until 2001.
Some groups have kept gay-themed events low-key until the government's position on LGBT organising becomes clearer.
Only about a dozen advocates met to mark the anti-homophobia awareness day on May 17 at a restaurant in Beijing, where they took pictures holding rainbow stickers and shared them online.
Earlier that day, Li Maizi, a prominent rights activist, said she was simply walking with rainbow stickers on her cheeks - also in the 798 art zone - when two security guards began to follow her.
"They only backed away when I looked one in the eye and asked if there was a problem," she told AFP.
Despite these recent controversies, Charlene Liu, founder of Shanghai Pride - a public event taking place for the 10th year in a row in June - was relatively upbeat.
"We are going to continue things like creating awareness in a peaceful manner, really showing people we are here, we exist," Liu told AFP.
"We are like normal people, we are like everyone else."
Liu said it was not clear whether gay people have been facing a greater number of attacks, but more people were using smartphones to record and post incidents online.
"Social media has come such a long way," Liu said.
"We might see it as an increase in these incidences, but we don't really have any data to show or to prove this."
Wuhan University students in central China shared screenshots on social media last month showing administrators warning them not to participate in an event to promote LGBT tolerance by wearing rainbow flags because of the activity's ties to "foreign forces".
A broadcaster that had the television rights to the Eurovision song contest in China blurred out flags being waved during the show and cut out a gay-themed performance. Gay content is forbidden on online streaming platforms.
Yet many gay rights activists remain optimistic that things will only get better for them in China.
"Since the 1990s, young people increasingly have generally higher acceptance of LGBT people," said Duan, media director of the Beijing LGBT Centre, who only goes by one name.
"The visibility of LGBT people is also getting higher and higher. In recent years, there are many activities held in various places."
In a sign of more official tolerance, Communist Party mouthpiece the People's Daily posted an essay promoting LGBT acceptance to its official Weibo account in response to the censorship debate.
The state-run China Social Assistance Foundation may also soon approve its first dedicated fund for LGBT groups, as long as they stay away from "foreign forces".
"This way, Chinese LGBT groups will enjoy more autonomy from foreign funds, and can function more effectively," the fund's organiser, Ah Qiang, told the Global Times.