A Hong Kong resident who had been studying in Japan has been arrested for allegedly "inciting secession" in online posts under the national security law after returning to the city to renew her identity card, according to sources familiar with the matter.

The woman was taken into custody by police in early March on suspicion of sharing online about two years ago slogans in support of pro-democracy student demonstration in Hong Kong that included calls for the semi-autonomous region's independence from China, the sources said.

She was living in Japan when she shared the posts online, they added. It is rare for an enforcement of the national security law for activities overseas to come to light.

The woman has since been released but not allowed to leave Hong Kong. A decision on whether she will be prosecuted will be reached possibly in May, according to the sources.

Tomoko Ako, a sociology and China studies professor at the University of Tokyo, expressed concern over the Hong Kong student's arrest in a blog post earlier this month, saying the reach of the national security law could extend to anyone outside of the former British colony.

"I am very concerned that Hong Kong's national security law is applied outside the region in this way," the professor wrote. "As similar cases accumulate, freedom of speech will eventually no longer be guaranteed, even in Japan."

The national security law, imposed by Beijing in 2020, criminalizes acts of secession, subversion, terrorism and collusion with foreign forces.

The sweeping legislation was introduced following the sometimes violent anti-government protests in 2019 that saw thousands take to the streets in Hong Kong.

Related coverage:

Hong Kong abruptly pulls screening of "Winnie the Pooh" horror film

H.K. organizer of Tiananmen vigil wins appeal against conviction

H.K. tycoon Lai's national security trial postponed to September