Hong Kong police have made their first arrests under a new national security law imposed by China’s central government, arresting at least two protesters for carrying flags and signs calling for independence.

A man who had a Hong Kong independence flag was arrested at a protest in the Causeway Bay shopping district after police had issued multiple warnings to the crowd that they might be in violation of the law, according to a police statement.

Officers later arrested a woman for holding up a sign displaying the British flag and calling for independence.

Police said later on Facebook that they had arrested more than 30 people on various charges, from unlawful assembly to violation of the national security law.

The law makes secessionist, subversive, or terrorist activities illegal, as well as foreign intervention in the city’s internal affairs. Any person taking part in secessionist activities, such as shouting slogans or holding up banners and flags urging for the city’s independence, is in violation of the law regardless of whether violence is used.

The arrests come less than 24 hours after the national security law was imposed by China after last year’s anti-government protests in the semi-autonomous territory. The law took effect on Tuesday at 11 p.m. (1500 GMT).

The law makes secessionist, subversive or terrorist activities illegal, as well as foreign intervention in the city’s internal affairs.

Any person taking part in secessionist activities, such as shouting slogans or holding up banners and flags calling for independence, is in violation of the law regardless of whether violence is used.

The most serious offenders, such as those deemed to be organising the crimes, could receive a maximum punishment of life imprisonment. Lesser offenders could receive jail terms of up to three years, short-term detention or restriction.

Hong Kong’s leader strongly endorsed the new law in her speech marking Wednesday’s 23rd anniversary of the territory’s handover from colonial Britain.

“This decision was necessary and timely to maintain Hong Kong’s stability,” Carrie Lam said following a flag-raising ceremony and the playing of China’s national anthem.

Hong Kong China
Protesters in Causeway Bay (Kin Cheung/AP)

A pro-democracy political party, the League of Social Democrats, organised a protest march during the flag-raising ceremony. About a dozen participants chanted slogans echoing demands from protesters last year for political reform and an investigation into accusation of police abuse.

The law further blurs the distinction between the legal systems of semi-autonomous Hong Kong, which maintained aspects of British law after the 1997 handover, and the mainland’s authoritarian Communist Party system.

Critics say it effectively ends the “one country, two systems” framework under which Hong Kong was promised a high degree of autonomy.

The law directly targets some of the actions of anti-government protesters last year, which included attacks on government offices and police stations, damage to subway stations, and the shutdown of the city’s international airport.

Acts of vandalism against government facilities or public transit can be prosecuted as subversion or terrorism, while anyone taking part in activities deemed as secessionist would also be in violation of the new law.

A reporter falls down after being sprayed with pepper spray
A reporter who was hit with pepper spray (Vincent Yu/AP)

Hong Kong’s police had issued a statement saying they would consider as illegal any flag or banner raised by protesters deemed to be promoting Hong Kong’s separation from China or expressing support for independence for Tibet, Xinjiang and the self-governing island democracy of Taiwan that China claims as its own.

Concerns have also been raised over the fate of key opposition figures, some of whom have already been charged for taking part in protests, as well as the disqualification of candidates for the Legislative Council elections scheduled for September.

Schools, social groups, media outlets, websites and others will be monitored and their national security status will be raised, according to the law’s text, while Beijing will have authority over the activities of foreign non-governmental organisations and media outlets in Hong Kong.

The legislation was mandated under Hong Kong’s local constitution but an earlier attempt to pass it in the city’s legislative body in 2003 was shelved in the face of massive public opposition.

Having lost patience, Beijing finally decided to circumvent the Hong Kong legislature and have it passed on Tuesday by the Standing Committee of the National People’s Congress, China’s rubber-stamp parliament.

President Xi Jinping signed a presidential order putting the law into effect and it has been added to the Basic Law, Hong Kong’s constitution.