The election will be the former British colony's first democratic exercise since Beijing imposed the security legislation against what China broadly defines as secession, subversion, terrorism and collusion with foreign forces, with punishment of up to life in prison.
The Chinese and Hong Kong governments say the law will not undermine Hong Kong's freedoms and is necessary to preserve order and prosperity after months of often-violent anti-government protests last year.
But activists say the law has ushered in a crackdown that spells the end of the Chinese-ruled city's high degree of autonomy.
They point to the disqualification from the city election of 12 opposition candidates, including young activist Joshua Wong. More are expected to be barred in coming days.
"Barring me from running ... would not stop our cause for democracy," said Wong, 23, who became an international figure leading months-long protests in Hong Kong as a teenager in 2012 and 2014.
The reasons given by the pro-Beijing city government for the disqualifications included what authorities deem subversive intentions, opposition to the security law and a campaign to obtain a majority that can block legislation.
Wong, who China calls a "black hand" of foreign forces, said his disqualification was "invalid and ridiculous" and the new law a "legal weapon used against dissidents".
The government denies political censorship or suppression of the right to run for the legislature, where only half the seats are directly elected. The other half is stacked with pro-Beijing figures.
Authorities also disqualified some members of the Civic Party, a moderate, old-guard opposition group, and others who won an unofficial "primary" vote held by the opposition camp this month.
That independently organised vote saw a younger, more defiant generation of democrats taking over the helm of the opposition, but the Civic Party disqualifications signal Beijing is becoming less tolerant of even moderate voices.
Former colonial power Britain said it was clear the candidates had been barred because of their political views. Hong Kong's last British governor, Chris Patten, called it an "outrageous political purge".
Hong Kong police have also arrested four students, aged 16-21, on suspicion they threatened China's national security by being involved in an online group that pledged to fight for Hong Kong's independence.
Critics say the new security law crushes rights and freedoms promised to the city when it returned to Chinese rule in 1997 under a "one country, two systems" formula.
Supporters of the law say it is vital to plug security loopholes exposed by last year's protests.
Under the Basic Law, the city's mini-constitution, Hong Kong was supposed to enact national security legislation by itself but failed due to opposition from democracy activists fearful of what they have long seen as Beijing's growing stifling of the city's freedoms.
An unfulfilled "ultimate aim" of the city's constitution is for universal suffrage, the principal demand of last year's protests.
Hong Kong has reported more than 3,000 coronavirus cases since January, far fewer than many other major cities around the world. The government has restricted group gatherings to two people to fight the spread.
(Reporting by Yanni Chow; Writing by Marius Zaharia; Editing by Simon Cameron-Moore, Robert Birsel) ((firstname.lastname@example.org; +852 2843 6358; Reuters Messaging: email@example.com))