Millions in Hong Kong have taken to the streets to protest against the now-suspended extradition bill.

China on Tuesday condemned violent protests in Hong Kong as an "undisguised challenge" to the formula under which the city is ruled, hours after police fired tear gas to disperse hundreds of protesters who stormed and trashed the legislature.

A representative of China's Hong Kong affairs office denounced the demonstrators, who are furious about proposed legislation allowing extraditions to China, and said Beijing supports holding criminals responsible, state media said.

The former British colony of Hong Kong returned to China in 1997 under a "one country, two systems" formula that allows freedoms not enjoyed in mainland China, including freedom to protest and an independent judiciary.

Monday was the 22nd anniversary of the handover.

Beijing denies interfering, but for many Hong Kong residents, the extradition bill is the latest step in a relentless march towards mainland control.

"Seriously violating the law, the act tramples the rule of law in Hong Kong, undermines social order and the fundamental interests of Hong Kong, and is an undisguised challenge to the bottom line of 'one country, two systems', Xinhua news agency quoted a Hong Kong affairs office spokesman as saying. "We strongly condemn this act."

Debris including umbrellas, hard hats and water bottles was among the few signs left of the mayhem that had engulfed parts of the city on Monday and overnight after protesters stormed and ransacked the Legislative Council, or mini-parliament.

Police cleared roads near the heart of the financial centre, paving the way for business to return to normal.

However, government offices, where protesters smashed computers and spray-painted "anti-extradition" and slurs against the police and government on chamber walls, were closed.

The government's executive council meeting was due to be held in Government House, officials said, while the legislature would remain closed for the next two weeks.

Millions of people have taken to the streets in the past few weeks to protest against the now-suspended extradition bill that would allow people to be sent to mainland China to face trial in courts controlled by the Communist Party.

Lawyers and rights groups say China's justice system is marked by torture, forced confessions and arbitrary detention. China has been angered by Western criticism of the bill.

The bill triggered a backlash against Hong Kong leader Carrie Lam, taking in the business, diplomatic and legal communities that fear corrosion of the legal autonomy of Hong Kong and the difficulty of guaranteeing a fair trial in China.

She has suspended the bill and said it would lapse next year, but protesters want it scrapped altogether and have pressed her to step down.

Lam, Hong Kong's self-styled Iron Lady, has created a fresh crisis for Chinese President Xi Jinping, who is already grappling with a trade war with Washington, a faltering economy and tension in the South China Sea.

Regina Ip, chairwoman of Hong Kong's pro-China New People's Party, said the protests had brought shame on Hong Kong.

"In the long term, (this) will impact Hong Kong's business environment. I believe various negative consequences of damages in our economy and prosperity will soon emerge."

Starry Lee, chairwoman of the Democratic Alliance for the Betterment and Progress of Hong Kong, also condemned the violence.

"This is an insult to LegCo (Legislative Council), an insult to Hong Kong rule of law," she said.

Chinese censors have worked hard to erase or block news of the Hong Kong protests, wary that any large public rallies could inspire protests on the mainland.

Screens went black on the BBC and CNN when they showed related reports in mainland China, as has happened during previous Hong Kong protests. Foreign news channels are only available in luxury hotels and a handful of high-end apartment complexes in China.

State news agency Xinhua wrote an upbeat Chinese-language report about a government-arranged concert in Hong Kong to celebrate the handover anniversary, complete with descriptions of the audience singing the national anthem and how the performers showed their "ardent love of the motherland".

A state newspaper in China called for "zero tolerance" after the violence in Hong Kong.

"Out of blind arrogance and rage, protesters showed a complete disregard for law and order," the Global Times, published by the Communist Party's People's Daily, said in an editorial.

The protests generated lively discussion on Chinese social media.

"Hong Kong shows that China cannot follow a Western political system. It's too easy to be manipulated and to bring chaos," wrote one user of the Twitter-like Weibo.

Another wrote, "When the children don't listen, their mothers should give them a smacked bottom."

Britain warned China that there would be serious consequences if the Sino-British agreement on Hong Kong was not honoured. China has dismissed Britain's concerns, saying Hong Kong was none of its business.

The UN human rights office in Geneva called on all sides to avoid violence.

"We ask protesters to demonstrate and express their grievances in a peaceful manner," spokeswoman Marta Hurtado

said in an email. "We urge HK authorities to immediately open a proper channel for dialogue and for the police and other members of the security forces to manage demonstrations according to international human rights norms and standards."