Hong Kong police on Sunday detained 47 pro-democracy activists on charges of conspiracy to commit subversion under the city's national security law.

The former lawmakers and democracy advocates had been previously arrested in a sweeping police operation in January but were released. They have been detained again and will appear in court on Monday, police said in a statement.

They allegedly violated the new national security law that was imposed by Beijing for participating in unofficial election primaries for the semi-autonomous Chinese territory’s legislature last year.

John Clancey, an American lawyer who became the first foreigner arrested under Hong Kong's national security law, displays a book before appearing at a police station in Hong Kong Sunday, Feb. 28, 2021. Clancey appeared at a police station Sunday, following a surprise request from police Friday. (AP PhotoVincent Yu)

John Clancey, an American lawyer who became the first foreigner arrested under Hong Kong's national security law, displays a book before appearing at a police station in Hong Kong Sunday, Feb. 28, 2021. Clancey appeared at a police station Sunday, following a surprise request from police Friday. (AP PhotoVincent Yu)

The defendants include 39 men and eight women aged between 23 and 64, police said.

The pro-democracy camp had held the primaries to determine the best candidates to field to win a majority in the legislature and had plans to vote down major bills that would eventually force Hong Kong leader Carrie Lam to resign.

In January, 55 activists and former lawmakers were arrested in a police operation for their roles in the primaries. The arrests were seen as the biggest move against Hong Kong’s democracy movement since Beijing imposed the national security law last June to quell dissent following months of anti-government protests in 2019.

Former legislator and District Council member Gary Fan, left, who was arrested under Hong Kong's national security law poses for photographers before walking in a police station in Hong Kong Sunday, Feb. 28, 2021. Across Hong Kong, dozens of others including former lawmakers and democracy advocates who were arrested in connection with Hong Kong's new National Security Law, went back into a police station Sunday, following a surprise request from police Friday. (AP PhotoVincent Yu)

Former legislator and District Council member Gary Fan, left, who was arrested under Hong Kong's national security law poses for photographers before walking in a police station in Hong Kong Sunday, Feb. 28, 2021. Across Hong Kong, dozens of others including former lawmakers and democracy advocates who were arrested in connection with Hong Kong's new National Security Law, went back into a police station Sunday, following a surprise request from police Friday. (AP PhotoVincent Yu)

Authorities said that the activists' participation was part of a plan to paralyze the city's legislature and subvert state power.

Among those arrested on Sunday was former lawmaker Eddie Chu. A post on his official Twitter account confirmed that he was being charged for conspiracy to commit subversion and that his bail was denied.

Another candidate in the primaries, Winnie Yu, was also charged and will appear in court on Monday, according to a post on her official Facebook page.

Former legislator and District Council member Gary Fan who was arrested under Hong Kong's national security law arrives at a police station in Hong Kong Sunday, Feb. 28, 2021. Across Hong Kong, dozens of others including former lawmakers and democracy advocates who were arrested in connection with Hong Kong's new National Security Law, went back into a police station Sunday, following a surprise request from police Friday. (AP PhotoVincent Yu)

Former legislator and District Council member Gary Fan who was arrested under Hong Kong's national security law arrives at a police station in Hong Kong Sunday, Feb. 28, 2021. Across Hong Kong, dozens of others including former lawmakers and democracy advocates who were arrested in connection with Hong Kong's new National Security Law, went back into a police station Sunday, following a surprise request from police Friday. (AP PhotoVincent Yu)