China has warned against foreign governments interfering in the Hong Kong protests, after the G7 summit of called for violence to be avoided.

Foreign ministry spokesman Geng Shuang said China was "strongly dissatisfied and resolutely opposed" to the G7 "making thoughtless remarks and gesticulating" about Hong Kong matters.

On a visit to the southern province of Guangdong near Hong Kong, public security minister Zhao Kezhi said China would crackdown on "violent terrorist activities" and firmly safeguard its political security.

Meanwhile, Hong Kong's leader said the government is confident it can handle the anti-government protests internally, despite the recent escalation of violence in the region.

Carrie Lam spoke in public for the first time since demonstrations escalated on Sunday, when police fired water cannon and volleys of tear gas in running battles with protesters who threw bricks and petrol bombs.

The Chinese-ruled city is grappling with its biggest political crisis since its handover to Beijing in 1997 and Communist Party authorities have sent a clear warning that forceful intervention is possible to quell the violence.

Ms Lam said she would not give up on building a platform for dialogue, although the time was not right to set up an independent inquiry into the crisis, one of the cornerstone demands of protesters.

"We should prepare for reconciliation in society by communicating with different people ... We want to put an end to the chaotic situation in Hong Kong," Ms Lam said, adding she did not believe her government had lost control.

More demonstrations are planned over coming days and weeks, posing a direct challenge to authorities in Beijing, who are eager to quell the unrest ahead of the 70th anniversary of the founding of the People's Republic of China on 1 October.

Carrie Lam believes her government has not lost control

Unrest in the Asian financial hub escalated in mid-June over a now-suspended extradition bill that would have allowed people to be sent to mainland China for trial in courts controlled by the Communist Party.

But the demonstrations have evolved over 12 weeks into a broad demand for greater democracy under the "one country, two systems" formula following the handover to China by colonial ruler Britain in 1997.

Authorities have so far refused to meet any of the protesters' five key demands: withdraw the extradition bill, setup an independent inquiry into the protests and perceived police brutality, stop describing the protests as "rioting", waive charges against those arrested, and resume political reform.

On Monday, the government said illegal violence was pushing Hong Kong to the brink of great danger after weekend clashes that included the first gunshot and the arrest of 86 people, the youngest just 12.

The protests come as Hong Kong faces its first recession in a decade, with all its pillars of growth under significant stress.

Rating agencies have raised long-term questions over the quality of its governance.