HONG Kong police have arrested more than 300 people on various charges as a new national security law imposed by China's central government came into effect.

The charges ranged from unlawful assembly to violation of the national security law. At least two protesters were arrested 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.

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.

Scotland's Constitutional Secretary, Michael Russell, has condemned the actions.

Taking to Twitter, Russell said: "The @Scotgov is very concerned at the decision of the Chinese Government to implement the National Security Law in Hong Kong.

"This action seriously undermines the principle of ‘One Country, Two Systems’, and will unacceptably diminish the rights and freedoms of its people."

The National:

The arrests come less than 24 hours after the national security law was imposed by China after last year's anti-government protests. The law took effect on Tuesday at 11pm (3pm GMT).

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 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.

The National:

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.

READ MORE: The UK needs to grow backbone and challenge Chinese law

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.

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.