Video caption The weekend saw riots over the mask ban, a second person shot, and tear gas fired at protesters

Anti-government marches in Hong Kong have ended in rioting, with attacks on government offices, a metro station and businesses with ties to mainland China.

Police used water cannon, tear gas and truncheons, reportedly removing masks from demonstrators they arrested, and a number of people were injured.

Tens of thousands of protesters had turned out in the rain, spurred to act by a ban on wearing masks at rallies.

The controversial ban was upheld by the High Court on Sunday.

Image copyright Reuters Image caption Bricks littered some of the streets after the protests

It was introduced by chief executive Carrie Lam who invoked powers dating back to colonial rule by the British.

Sunday's protests were fuelled by both the mask ban and the use by police of live bullets against protesters, which left two people injured this week.

A wave of rioting in Friday led city metro services to shut down but they had partially resumed on Sunday.

Sorry, this Twitter post is currently unavailable.

Demonstrators fear that democratic rights are being eroded in the semi-autonomous territory under Chinese rule.

What happened on Sunday?

The protesters' aim was to make clear their utter contempt for the emergency law banning face masks and almost all covered their faces, the BBC's Robin Brant reports from Hong Kong.

Police watched as protesters moved peacefully, chanting "Hong Kong resist" as they walked through the heart of the city, but after a few hours officers moved to end the disruption.

Image copyright EPA Image caption Many protesters wore Guy Fawkes masks

Tear gas canisters were fired on the crowd from police on walkway bridges above. Video shows small groups being targeted by charging officers on the ground.

Many shops were again closing early on Sunday evening in anticipation of more trouble, our correspondent says.

Sorry, this Twitter post is currently unavailable.

Among incidents on Sunday:

An entrance to the Mong Kok metro station was attacked with signs and windows smashed, and a lift set on fire

Rioters smashed their way into local government offices in the Cheung Sha Wan area

A masked protester briefly hijacked an excavator in an attempt to dig up the road in Wan Chai

A taxi driver was badly beaten in Sham Shui Po after reportedly driving his car into a crowd, injuring at least one person

Image copyright EPA Image caption A driver injured by protesters was rescued by firefighters

Many more people turned out for the new marches than on Saturday, when a small march was held in the aftermath of Friday's rioting.

"I'm not sure how many more chances we'll get to fight for freedom," said Hazel Chan, 18, who was wearing a surgical face mask when she spoke to the BBC near a road block on the city's Rodney Street.

"I don't think it'll have a big impact on the government's stance but I hope we gain international attention and show the world we won't get used to this evil law."

Image copyright AFP Image caption Protesters vandalised the Cheung Sha Wan local government offices

Fellow demonstrator Riley Fung, 19, said: "I don't have much confidence in protests because the government has ignored our demands even when millions came out."

But she continued to protest, she added, in order to express herself.

Defiance in the rain

By Helier Cheung, BBC News, Admiralty, Hong Kong

Despite the pouring rain, the mood was defiant. Thousands of protesters joined the unauthorised march, wearing masks despite the emergency law, blocking and marching down roads, and chanting slogans such as "Hong Kong revolt" and "stand with Hong Kong" in Cantonese and English.

Despite the clear defiance of the law, there were hardly any police to be seen in the first few hours. Protesters set up a road block, dug up bricks, and tied banners condemning the government onto flyovers.

Then, seemingly out of nowhere, several tear gas canisters were fired. Tensions flared further as a convoy of dozens of police vans suddenly emerged - protesters shouted "the water cannon is coming" and ran down the streets. Within an hour or so, the roads were open again - and the protesters had seemingly melted away.

How are the authorities responding?

Ms Lam vowed on Saturday to prevent further violence, saying: "We cannot allow rioters any more to destroy our treasured Hong Kong."

Video caption Protests resumed on Saturday after Friday's rioting

She justified the law against masks as a response to the demonstrators' "extreme violence" which was, she said, endangering Hong Kong's public safety.

A second legal challenge to the mask ban, which was brought by opposition legislators, was rejected by the High Court.

The legislators had argued that the prohibition was unconstitutional because it denied the rights of free expression and free assembly.

How dangerous is the situation?

Over the months, clashes between police and activists have become increasingly violent.

On Tuesday, police shot a protester with a live bullet for the first time, wounding an 18-year-old, who was allegedly attacking a police officer.

Video caption Watch the moment protesters burn a banner after Hong Kong's face mask ban

On Friday, a boy aged 14 was shot in the leg with a live round in Yuen Long, a town to the west of the city.

A plain-clothes police officer with an unmarked police car was later set upon by rioters in the same area but officials did not link the two incidents, the South China Morning Post reports.

What is Hong Kong's status?

Hong Kong is a former British colony handed back to China in 1997.

It has a "one country, two systems" agreement that guarantees it some autonomy, and its people certain freedoms, including freedom of assembly and freedom of speech.

But those freedoms - the Basic Law - are only enshrined until 2047 and it is not clear what will happen then.