Hundreds of thousands of Hongkongers turned out over the weekend to vote in an unofficial two-day primary election held by the city’s pro-democracy camp as it gears up to field candidates for a forthcoming legislative poll.

The exercise is being held two weeks after Beijing imposed a sweeping national security law on the semi-autonomous territory in a move widely seen as chipping away at the “one country, two systems” framework under which Britain handed Hong Kong over to China in 1997.

It was passed in response to last year’s massive protests calling for greater democracy and more police accountability.

Hong Kong Vote
People queue up to vote in Hong Kong in an unofficial ‘primary’ for pro-democracy candidates ahead of legislative elections in September (Kin Cheung/AP)

Scores of people lined up at polling booths in the summer heat to cast their vote despite a warning by Hong Kong’s constitutional affairs minister, Eric Tsang, last week that the primaries could be in breach of the new national security law, because it outlaws interference and disruption of duties by the local government.

Organisers have dismissed the comments, saying they just want to hold the government accountable by gaining a majority in the legislature.

The legislation prohibits what Beijing views as secessionist, subversive or terrorist activities or as foreign intervention in Hong Kong affairs.

Under the law, police now have sweeping powers to conduct searches without warrants and order internet service providers and platforms to remove messages deemed to be in violation of the legislation.

Hong Kong Vote
Banners of pro-democracy candidates Jannelle Leung, left, and Joshua Wong are carried by supporters outside a subway station in Hong Kong (Vincent Yu/AP)

On Friday, police raided the office of the Public Opinion Research Institute, a co-organiser of the primary elections. The computer system was suspected of being hacked, causing a data leak, police said in a statement, and an investigation is continuing.

Hong Kong’s pro-democracy camp, which includes multiple parties, is attempting to join forces and use the primaries as a guide to field the best candidates in the official legislative election in September. Its goal is to win a majority in the legislature, which is typically skewed toward the pro-Beijing camp.

To hold the primary elections, pro-democracy activists had raised money via crowdfunding.

They pledged to veto the government’s budget if they clinch a majority in the legislature.

Under the Basic Law, under which Hong Kong is governed, city leader Carrie Lam must resign if an important Bill such as the budget is vetoed twice.

On Saturday alone, nearly 230,000 people voted at polling booths set up across the city, exceeding organisers’ estimates of a 170,000 turnout over the weekend.

Organisers said on Sunday that nearly 600,000 people voted at polling booths set up across the city, exceeding estimates of a turnout of 170,000.

“Despite the threat of the national security law, there are still nearly 600,000 people coming out to vote, “ Au Nok-hin, one of the organisers of the primaries, said.

”We can see Hongkongers are really brave.”