At the beginning of the year, President Tsai Ing-wen (蔡英文) looked at risk of becoming the nation’s first one-term president. Then came the unrest in Hong Kong.

Tsai had clawed back some ground in opinion polls before protesters started taking to the streets of Hong Kong in the hundreds of thousands in June.

However, the mass demonstrations there against China’s deepening encroachment have given her a noticeable boost ahead of the presidential elections in January next year.

As Taiwanese watch with concern the events in Hong Kong, particularly crackdowns on demonstrators, with scenes of police beating protesters huddled in balls on the floors of Hong Kong’s subways, Tsai’s firm stance on China has become her biggest selling point.

What happens in Hong Kong, including the way Beijing responds to protracted unrest, matters for democratically run Taiwan.

Taiwan’s leaders have often faced challenges in dealing with China. There are risks at home from being seen as either too hard or too soft and indeed, it was her China policy that tripped Tsai up in the second half of last year.

Tsai’s refusal to endorse Beijing’s bottom line that both sides belong to “one China” — the so-called “1992 consensus” — while at the same time avoiding overt moves to assert Taiwan’s independence upset people on both sides of the spectrum.

The upshot was a sense she had mismanaged the China issue.

Chinese President Xi Jinping’s (習近平) Jan. 2 speech, in which he urged in-depth “democratic consultations to work toward China’s long-held goal of unification” and explicitly reaffirmed “one country, two systems” as his preferred model, followed by the protests in Hong Kong, have rallied support behind Tsai taking a stronger stance.

She has said Taiwan would never unite with China as long as she is in power.

In the last presidential election in 2016, Jamie Chiang voted for a candidate who promised a closer relationship with China.

Come January, she will back Tsai.

“I am terrified Taiwan may become like Hong Kong if we accept the ‘92 consensus,’” the Taipei electronics company worker said. “I am worried we may lose our democracy, freedom and everything we are used to because you can’t trust China.”

Tsai’s popularity sank as low as 15 percent after the Democratic Progressive Party (DPP) fared poorly in the nine-in-one elections in November last year.

Part of her falling approval was due to cuts in civil servant, teacher and military pensions, plus wage stagnation.

Tsai stepped down as DPP chairperson and there was chatter she could be dumped as its candidate for the election.

Before the pro-democracy protests erupted in Hong Kong, Tsai still lagged behind Kaohsiung Mayor Han Kuo-yu (韓國瑜), the Chinese Nationalist Party’s (KMT) presidential candidate, by double digits in most opinion polls.

Now, she leads Han by 8 percentage points, according to a survey late last month by broadcaster TVBS.

Much of her support is from those under 40.

With an increasingly assertive Chinese leadership under Xi — and a trade dispute threatening to split the world into competing spheres of Chinese and US influence — the presidential election is shaping up to be Taiwan’s most consequential since its first direct presidential election in 1996.

Hong Kong was returned to Chinese rule in 1997 under an agreement with the UK that guaranteed the territory a “high degree of autonomy” until 2047.