Image copyright Reuters Image caption Police said they had warned protesters to disperse

Police in Hong Kong have used pepper spray to disperse thousands of protesters angry at China's plans that could stop two pro-independence legislators from taking their seats.

Beijing is now interpreting one of Hong Kong's laws to ban Sixtus Leung and Yau Wai-ching. A decision is due on Monday.

China is acting within its legal rights, but many in Hong Kong accuse Beijing of ruling by decree.

The top legislative panel in China said Beijing must intervene in the dispute.

It added that it should deter advocates of Hong Kong independence, as their actions were a threat to national security, state news agency Xinhua reported.

Image copyright AP Image caption Some protesters protected themselves with umbrellas, the symbol of the 2014 pro-democracy movement

Image copyright EPA Image caption Many fear that Hong Kong freedoms are being undermined

Some demonstrators scuffled with police in front of the office of China's representative in the territory. Protesters used umbrellas to shield themselves from the spray, and some threw bottles at police.

Organisers said there were at least 10,000 protesters in the march. Police said there were 8,000 people at the peak of the demonstration.

Two men were arrested for obstructing police duties and refusing to show their identification cards, police added.

Fury on the streets, by Helier Cheung, BBC News, Hong Kong

Image copyright AP

There was a lot of anger directed at Beijing during the protests. Various demonstrators told me they felt Beijing was acting as a "big brother" or ruling by decree, and undermining the rule of law in Hong Kong.

The clashes that broke out after dark also fit a recent pattern. Protests organised by pro-democracy groups tend to be orderly and family friendly during the day, with police and demonstrators co-operating to some extent to allow traffic to pass through at certain times.

But more confrontational groups may stay on after the official march ends, staging sit ins or, as in this case, marching away from the route agreed with police and scuffling with officers.

It reflects a change in Hong Kong politics. In the past, many saw peaceful protest as the best way to bring about change. But in the last few years, some protesters have become more confrontational - arguing that playing by the rules has not achieved anything.

The issue started when the two lawmakers pledged allegiance to the "Hong Kong nation" and displayed a "Hong Kong is not China" banner during a swearing-in ceremony of the city's Legislative Council, the territory's parliament, last month.

Their oaths were not accepted, and a local Hong Kong court has been looking into the case.

However, China announced that its parliament would invoke its rarely used power to interpret Hong Kong's mini constitution, the Basic Law, to prevent them from taking office.

The case has been seen by many in Hong Kong as a risk to the freedoms granted to the former British colony when it was handed back to China in 1997, which included a high degree of autonomy, and judicial independence.