Image copyright AFP Image caption Yau Wai-ching held the ruling for the cameras outside the High Court on Tuesday

Hong Kong's high court has disqualified two pro-independence lawmakers from taking their seats in parliament.

Sixtus Leung and Yau Wai-ching altered their oaths to insult China, and promote Hong Kong's independence from China, when being sworn in last month.

Beijing pre-empted the court judgement, ruling last week that legislators who did not take their oath in a solemn way would be disqualified from office.

Critics called the intervention a violation of Hong Kong's rule of law.

The ruling has sparked large protests in recent weeks, both for and against the Chinese government's involvement.

Judge Thomas Au said that Ms Yau and Mr Leung had clearly refused to be sworn in properly - and as such were disqualified from office. He also issued an injunction to stop them from acting as legislators.

Ms Yau and Mr Leung condemned the ruling.

"The judgement simply reflects that elections in Hong Kong are meaningless," Mr Leung told reporters after the ruling.

"Our one role is to represent the Hong Kong people," he said, adding that they would appeal against the ruling even though the court costs could bankrupt them.

How did the controversy start?

Mr Leung and Ms Yau, both members of the pro-democracy Youngspiration party, were elected in September.

At their swearing-in ceremony in October the duo unfurled a pro-independence banner and used what is considered to be a disrespectful pronunciation of the word China.

Ms Yau also swore while taking her oath.

Both their oaths were invalidated - and the government sought to block them from retaking their oaths, saying they should be disqualified altogether.

Image copyright Reuters Image caption Ms Yau unfurled a banner saying "Hong Kong is not China" during one of her oath-taking attempts

What was the pronunciation issue?

During their oath, the duo pronounced China "Shee-na" - a variation on Shina, a term used by the Japanese during World War Two that is considered disrespectful in China.

Was Beijing behind the disqualification?

Hong Kong is semi-autonomous under the "one country, two systems" framework - in place since the territory was returned to China from the British in 1997.

Hong Kong's mini constitution, the Basic Law, states that it handles most of its affairs internally, while Beijing is responsible for defence and foreign affairs.

Image copyright Reuters Image caption Some protesters took to the streets to march against the two pro-independence candidates

But the Basic Law also allows Beijing the final say in how to interpret its laws.

Beijing issued an interpretation last week, saying that oaths should be taken in a way that is "solemn, accurate and complete", and that anyone whose oath is invalidated does not get a second chance to be sworn in.

Critics say what Beijing has done is effectively change the law, rather than just clarify how it should be enacted.

However, Judge Au said that he arrived at his conclusion independently of China's ruling.

What happens next?

The seats of Mr Leung and Ms Yau have been declared vacant, and by-elections will need to be held to fill their seats.

However, Mr Leung and Ms Yau say they will appeal against the court decision - and apply for an injunction to stop a by-election in the meantime. It is not clear if the courts will grant an injunction.

They would not be drawn on whether they would stand in any by-elections, saying that appealing against the court decision is the priority.

"What is the meaning of a by-election if the result can be overruled by the government?" Mr Leung said.

Image copyright Getty Images Image caption Mr Leung and Ms Yau were elected to their seats in September

The Hong Kong government welcomed Tuesday's court ruling - and is certain to fight any appeal.

And Beijing has also taken a firm stance. Li Fei, deputy secretary of China's top legislative panel, warned there would be "no obscurity and no leniency" in China's "firm and clear attitude towards containing and striking the Hong Kong independence forces".

Analysis: Helier Cheung, BBC News, Hong Kong

Image copyright AP Image caption Legislators have often used the oath-taking process as an opportunity to protest

The court decision ends the immediate question of whether Ms Yau and Mr Leung are still eligible for office.

But the judgement, and last week's ruling from Beijing, also have wider implications for Hong Kong's politicians - as they leave open the possibility that other legislators could be disqualified because of their oaths, too.

Many pro-democracy legislators are known for expressing their views in parliament in creative ways - for example, by yelling pro-democracy slogans before or after their oaths, or holding yellow umbrellas to show their support for political reform.

Following Beijing's ruling, some Chinese officials have suggested that this could have invalidated the oaths of up to 15 pro-democracy lawmakers.

Now, several Hong Kongers have begun to attempt to launch legal challenges to disqualify legislators - on both the pro-Beijing, and pro-democracy, sides.

One lawsuit even argues that the Chief Executive CY Leung's oath should be invalidated, since he missed out the words "Hong Kong" when he was being sworn in.