Pro-democracy parties in Hong Kong held primary polls on Saturday to choose candidates for upcoming legislative elections despite warnings from government officials that it may be in breach of a new security law imposed by China.

Thousands queued in the intense summer heat at unofficial polling stations across the city hours after police raided an opinion pollster helping to conduct the vote.

Thousands queued in the intense summer heat at unofficial polling stations across the city hours after police raided an opinion pollster helping to conduct the vote Thousands queued in the intense summer heat at unofficial polling stations across the city hours after police raided an opinion pollster helping to conduct the vote Photo: May James / May JAMES

"The more Hong Kong people were suppressed, the firmer Hong Kong people stand," democracy campaigner Benny Tai, a legal scholar and co-organiser of the primary, said as voting got under way at 250 polling stations.

After polls closed at 9pm on Saturday, organisers said almost 230,000 people had cast their votes, adding that the number was higher-than-expectation.

Voting in the two-day primary will continue on Sunday.

The primary was held days after a Hong Kong government minister warned it could be in breach of a tough new security law imposed by Beijing The primary was held days after a Hong Kong government minister warned it could be in breach of a tough new security law imposed by Beijing Photo: May James / May JAMES

"We've reached our basic (turn out) target, but we won't be satisfied by this... The more people come out to vote, the higher the primary is recognised," former lawmaker and one of the primary's organisers Au Nok-hin said on Saturday night.

"Under the new national security law, no one knows how many pro-democracy candidates would be allowed to run in the upcoming LegCo election. They could possibly be disqualified by the government under the new law," a 34-year-old voter who gave her surname as Poon told AFP near a polling station in Tseung Kwan O district.

Pro-democracy activist Joshua Wong (C) campaigns for the primary which will choose candidates for upcoming legislative elections Pro-democracy activist Joshua Wong (C) campaigns for the primary which will choose candidates for upcoming legislative elections Photo: May James / May JAMES

"I treasure every chance we still have to vote for the candidate I like and I hope Hong Kong people can show the government that we won't bend our knees through the poll," she added.

On Thursday, constitutional and mainland affairs minister Erick Tsang warned that those "organising, planning and participating" in the primary might commit offences of succession, subversion and colluding with foreign forces, according to interviews given to a select few pro-Beijing newspapers.

Beijing imposed the new law on Hong Kong last week targeting acts of subversion, secession, terrorism and foreign collusion with a maximum penalty of life imprisonment, in response to huge and often violent democracy protests that erupted last year.

China has opened a new office for its security agents to operate openly in Hong Kong for the first time under a tough new security law it imposed on the city China has opened a new office for its security agents to operate openly in Hong Kong for the first time under a tough new security law it imposed on the city Photo: AFP / Anthony WALLACE

The law is the most radical change in Hong Kong's freedoms and autonomy since Britain handed the city back to China in 1997.

Similar national security laws are used to crush dissent on the mainland and police in Hong Kong have already arrested people voicing certain political views now deemed illegal, such as advocating independence or greater autonomy.

Organiser Au argued that Tsang's remarks were "ungrounded and without any legitimate reasons".

"The suppression (we) faced when organising the primary proves that our government have no tolerance for dissidents, to accept a society with diversity and democratic universal suffrage," Au told media.

Police late Friday night raided the office of Public Opinion Research Institute (PORI), a prominent opinion pollster that was helping the pro-democracy camp to conduct the primary.

Police claimed they were responding to a report that PORI computers had been hacked, resulting in an unlawful leak of personal information.

PORI president Robert Chung said officers copied computer files and he was given a "verbal promise" that they would not use information unrelated to the suspected leak.

The raid raised concerns over the primary but Chung said the voting system was safe and its operation was legal and transparent.

"The primary election is a peaceful, rational and non-violent approach to express public opinion," he said.