TAIPEI (AFP) - Taiwan's President Tsai Ing-wen is riding high in the polls as she seeks a second term, a remarkable reversal of fortune aided by bellicose threats from Beijing and unease over political unrest in Hong Kong.
Ms Tsai, 63, is up against Mr Han Kuo-yu of the Beijing-friendly Kuomintang (KMT) party, who had a stratospheric rise last year in local elections but has struggled on the campaign trail.
Voters go to the polls on January 11 and relations with China are dominating after three years of Beijing taking a hardline approach towards Taiwan.
"Anti-China sentiments have become a crucial deciding factor in ratings," said Mr Wang Yeh-lih, a political analyst at National Taiwan University, adding Ms Tsai's party slogan "Resist China, Defend Taiwan" had resonated.
"Han is labelled as pro-Beijing while Tsai's camp appeals to voters that today's Hong Kong could be tomorrow's Taiwan."
Taiwan's public has closely followed the huge and violent pro-democracy protests in Hong Kong as the city chafes under increasingly assertive Chinese rule.
Taiwan has been a de facto sovereign nation since the end of a civil war in 1949, but China still views the island as its territory and has vowed to reunite it, by force if necessary.
It has proposed the "one country, two systems" model that allows Hong Kong to keep certain liberties as a possible future for the island.
But that offer looks increasingly hollow as Hong Kong police battle protesters each weekend and Beijing vows no compromise.
TSAI BOUNCES BACK
It is a vision Ms Tsai has seized on.
"The world is watching that after Hong Kong, what kind of choice will Taiwanese make?" she asked supporters at a rally earlier this month.
Most polls show Ms Tsai significantly ahead - between 35-50 per cent compared to Mr Han's 15-30 per cent.
Only a year ago the story was very different.
Her Democratic Progressive Party (DPP) received a drubbing in local elections while Ms Tsai's approval rating had more than halved from 70 per cent when she took office in 2016.
The same elections brought Mr Han to power as mayor of Kaohsiung, a traditional DPP heartland, amid a backlash over pension reform and the push to make Taiwan the first place in Asia to legalise same-sex marriage.
But in less than twelve months Ms Tsai finds herself back on top.
Her ratings began to rise in January after President Xi Jinping gave a speech warning that Taiwan's unification was "inevitable" and that Beijing would not give up the threat of force.
It was the latest in a long line of threats.
Since Ms Tsai's election Beijing has sought to isolate the island because her party refuses to acknowledge Taiwan is part of "one China".
It cut official communication with her government, ramped up military and economic pressure and poached seven of Taiwan's dwindling diplomatic allies.
But this stick approach appears to have backfired.
'PEACE OR CRISIS'
Mr Han has struggled to shake-off the DPP's accusation that he is too friendly to Beijing.
He has described January's vote as a choice between "peace or crisis" with China, campaigning on the slogan "Taiwan safe, people rich".
"Tsai is incapable of running the country so the Republic of China (Taiwan) is in a storm and cross-strait relations are turbulent," he told a recent rally.
He has also sought to tap into public sympathy for Hong Kong, voicing support for democracy protests and rejecting the idea of "one country, two systems" for Taiwan saying it would be implemented "over my dead body".
But he also faced criticism over a perceived cosiness with Beijing after returning from a trip in March to Hong Kong, Macau and mainland China where he met with senior party officials.
His ratings took a further dip when the KMT released a list of preferred candidates likely to get parliamentary seats under a proportional voting system, many of whom were seen as too conservative, including one who was a staunch advocate of unification with China.
"It would be difficult to turn the tide with less than a month before voting but I think the DPP dares not relax yet," Mr William Niu, a political analyst at Chinese Culture University in Taipei, told AFP.
Washington has remained Taipei's most powerful unofficial ally and its leading arms supplier despite switching recognition to Beijing in 1979.
It manages relations through the American Institute in Taiwan (AIT), which has said it will work with whoever wins.
Mr J Michael Cole, a Taipei-based expert at the University of Nottingham's Taiwan Studies Programme, said western liberal democracies were watching the vote closely.
"A Taiwan that remains clearly allied with democracies and countries that embrace the rule of law is a benefit," he said.
"If Taiwan were to make a different choice and turn inward or turn more towards China, my view is that the international community would lose an important ally."