HONG KONG, July 20 — Prominent Hong Kong democracy activist Joshua Wong applied tonday to run for a seat in the Chinese-ruled city's legislature, raising the prospect of a battle with authorities after being barred from running in previous polls.

Wong is one of more than a dozen young, more confrontational politicians who outshone old guard democrats in unofficial opposition primaries this month in what many saw as a protest vote against a national security law imposed by Beijing.

The September 6 vote will see the democratic opposition try to reclaim some political influence in a city assembly stacked with Beijing loyalists. Only half its seats are directly elected.

Political analysts and democracy activists expect authorities will try to disqualify some candidates.

Beijing says the primaries were illegal and may have violated the security law, which punishes what China broadly defines as secession, subversion, terrorism and collusion with foreign forces with up to life in prison.

“With the possibility of facing a life sentence ... I still hope to receive people’s mandate and let the world know that we will continue to fight until our last breath,” Wong, who sees himself as a prime target of the new law, told reporters.

In the past four years, authorities have barred 18 democrats from running in local elections, including Wong, according to the group Civil Rights Observer.

Wong, who was 17 when he became the face of the 2014 student-led Umbrella Movement protests, was not been a leading figure of the often-violent protests that shook the semi-autonomous financial hub last year.

However, he has drummed up support for the pro-democracy movement abroad, meeting politicians from the United States, Europe and elsewhere, drawing the wrath of Beijing, which says he is a “black hand” of foreign forces.

He was disqualified from running in the former British colony's district council elections last year on the grounds that advocating for Hong Kong's self-determination violated electoral law, which he described at the time as political censorship.

Wong has said he supports the idea of a non-binding referendum for people to have a say over Hong Kong’s future but that he is against independence.

Wong did not sign a form in which candidates are asked to pledge allegiance to Hong Kong and its mini-constitution, the Basic Law. The form is not mandatory, but candidates are required by the security law to pledge allegiance in writing or through other means. — Reuter