Hong Kong is now entering its 11th week of unrest, with increasing outbreaks of violence and strikes causing major disruption.
The Chinese government has strongly criticised the protesters, but many are wondering whether it will eventually lose patience and take more direct action.What legal options does Beijing have to intervene, and could we ever see Chinese military action in Hong Kong?
Could China send in the army?
The Basic Law - Hong Kong's mini constitution since the UK handed the territory back to China in 1997 - is very clear. Chinese military intervention can only come at the request of the Hong Kong government, and for the "maintenance of public order and in disaster relief".
Most analysts say it is almost unthinkable that even a highly pro-Beijing Hong Kong government would want this.
Images of Chinese troops marching through Hong Kong crushing pro-democracy protests, even if they didn't use lethal force, would be disastrous for the territory's reputation, risk destabilising its economy and cause international outrage.
China's People's Liberation Army (PLA) has had about 5,000 personnel based in Hong Kong since the handover.Adam Ni, a China researcher at Macquarie University, told the BBC the Hong Kong Garrison is "fairly low profile" and largely "a symbolic presence of China's sovereignty".
But on 31 July, the garrison broke its silence during the protests, releasing a video which included footage of soldiers shouting - in Cantonese - "all consequences are at your own risk", troops advancing against protesters and a scene where police held up a banner with the words "Stop charging or we use force", a warning commonly used by Hong Kong police during unrest.
It was widely seen as a warning about how China could respond, if called upon. Ben Bland, research fellow at Sydney's Lowy Institute, told AFP that China appeared to be playing on the threat of intervention "to try to scare off the protesters".
So far, China's top policy office on Hong Kong has said it has full faith in the police to handle the unrest. But spokesman Yang Guang also warned that "those who play with fire will perish by it" and protesters should not "mistake restraint for weakness".
Mr Ni said the political risk for the Chinese government, both domestically and internationally, of military intervention was simply too great, and could indeed worsen the crisis.
"Any military response short of overwhelming force would lead to further resistance," he told the BBC.
Can China intervene politically?
Arguably, China has already made a number of political interventions and that's been a driving factor behind recent protests.
Hong Kong's parliament, the Legislative Council is tilted in Beijing's favour and in 2017, despite huge protests, a law was passed that meant candidates running to be its chief executive had to be pre-approved by a largely pro-Beijing committee. The winner, who must also be approved by the central government in Beijing, picks the ministers.
Carrie Lam was elected in 2017, and it was she who introduced the now-defunct extradition bill which sparked the new protests, becoming a focus of the anger herself.
Prof Dixon Ming Sing of the Hong Kong University of Science and Technology says Beijing has "done a lot to show its power... adamantly refusing the resignation of Carrie Lam and refusing to [let her] formally withdraw the bill".
"If Beijing wants her to resign, can it be done? Absolutely," he said. "But I think Beijing doesn't want to do so because it wants to show it cannot be shaped by public opinion."
Of course, even if Ms Lam did leave her post, her replacement would also have to have Beijing's backing.
And other political moves in Hong Kong in recent years - including opposition MPs being disqualified for failing to say the oath of allegiance properly, and a law proposing banning disrespect of the Chinese national anthem - have made it clear that the authorities in Hong Kong are keen to counter anti-Beijing sentiment.
Could China target individual activists?
The protests were trigged by an extradition bill, which critics feared could have been used by China to remove political activists to the mainland, where they would face almost certain conviction.
Carrie Lam has said the bill is now dead, but even without it, there have been enough reports of China bypassing such laws to detain Hong Kong citizens for protesters to be worried.
Gui Minhai, who ran a bookstore in Hong Kong selling books critical of the Chinese government, is one of the most high-profile cases. He went missing in Thailand in 2015, before reappearing in China where he was detained over a fatal car accident in 2003.
A Chinese court sentenced him to two years in prison. He was released in 2017 but was allegedly seized again the following year while on a train in China. He has not been seen since.
And even if activists themselves don't fear arrest, some may fear repercussions for any family members on the mainland.
However despite fears of direct intervention in Hong Kong, Beijing's most effective tool to calm the unrest is likely to be a subtle but potent economic one.
Hong Kong is an economic powerhouse, and has remained so since handover in part because of the special status it has enjoyed as part of the handover agreement. But cities on the mainland like Shenzhen and Shanghai have rapidly caught up since 1997 nonetheless.
If Hong Kong continues to challenge Beijing's authority, the government could further redirect investment and trade towards the mainland, squeezing Hong Kong's economy and making it far more reliant on Beijing's goodwill.