Joshua Wong and other prominent pro-democracy activists in Hong Kong quit their political group Demosisto on Tuesday as China's top legislative body reportedly enacted a national security law for Hong Kong.

In announcing his move on social media, along with two other founding members of the group, Nathan Law and Agnes Chow, Wong cited undue personal risks given the law may carry a maximum penalty of life imprisonment for activities deemed illegal.

Pro-democracy activist Joshua Wong speaks in Hong Kong on June 3, 2020, about the Chinese legislature's decision to enact a national security law for the former British colony. (Kyodo)

"Since Demosisto was established, the group has been embroiled in the political vortex," the group's secretary said. "But as national security law comes is not unbelievable anymore that taking part in democratic resistance could become a matter of life and death."

The law, reportedly approved by the Standing Committee of the National People's Congress, would crack down on what Beijing views as subversive activity in Hong Kong by outlawing acts and activities of separation, subversion, terrorism and collusion with external forces.

Law warned on his Facebook page that Hong Kong people will now face possible prosecution for their speech and thoughts under the new law, but urged people to keep up their struggle.

Both Wong and Law have said they will stand in the Legislative Council election in September.

Chow said she will quit the group and stop participating in the group's work abroad.

The group announced it is disbanding immediately due to its key members leaving.

The Hong Kong National Front, a pro-independence group, announced the dissolution of its Hong Kong chapter but said it will continue advocating for Hong Kong's independence from its overseas chapters.

Student activist group Studentlocalism also said it is disbanding and setting up overseas chapters instead, to continue its independence advocacy.

According to a draft national security bill reported earlier, a national security office will be set up in Hong Kong, and advisers from Beijing will be deployed to oversee the law's enforcement. Select cases would be sent to and tried in mainland courts.

"Hong Kong cannot become a base to subvert the power of the state," Tam Yiu-chung, the sole Hong Kong member of the standing committee, told Hong Kong media on Tuesday.

"If Hong Kong is being exploited to attack the state, how can the two systems survive?" he said, referring to the "one country, two systems" principle under which Hong Kong has been governed since its return to Chinese rule in 1997.

Hong Kong government leader Carrie Lam declined to comment on the enactment of the law at a regular press briefing earlier in the day, claiming the details of the law were not yet revealed.

Organizers of the annual July 1 march said they will hold a protest against the law despite a police ban, while police will put some 4,000 officers on standby across the territory to enforce the ban, local media reported.

Related coverage:

Japan says passage of China's security law for Hong Kong "regrettable"

China enacts national security legislation for Hong Kong: media

U.S. starts revoking Hong Kong privileges to pressure China