TAIPEI, Taiwan —

The future of Taiwans democracy is on the line as the self-ruled islands 19 million voters decide on whether to give independence-leaning President Tsai Ing-wen a second term.

Voting began at 8 a.m. Saturday and wraps up at 4 p.m.

Tsais Nationalist Party challenger, Han Kuo-yu, planned to cast his ballot in the southern city of Kaohsiung, where he is mayor. Tsai was to vote in Taipei.

For many in Taiwan, months of protests in Hong Kong have cast in stark relief the contrast between their democratically governed island and authoritarian, communist-ruled mainland China.

Tsai said the election was a chance to protect Taiwan’s democracy.

Let’s get out there and vote tomorrow, let us tell the world with our own votes that Taiwanese are determined to defend sovereignty, determined to guard democracy and determined to persist in reforms, she said at a rally late Friday.

Tsais Nationalist Party challenger, Han Kuo-yu, Han has said Taiwan should be more open to negotiations with China, in contrast to Tsai, who has dismissed Beijing’s overtures.

China and Taiwan separated during civil war in 1949, but Beijing still claims sovereignty over the island and occasionally threatens to use force to seize control if necessary.

The Hong Kong protests have undermined Taiwan support for the one-country, two-systems approach Beijing has championed for governing both that former British colony and Taiwan.

Fears of Chinese interference in Taiwans politics and an uptick in the economy have helped Tsai regain an edge after a dire electoral setback for her Democratic Progressive Party 14 months ago.

The Nationalists have struggled to find candidates who can fire up their pro-China supporters and win over young Taiwanese who increasingly favor the DPP.

The election of former lawmaker Han as Kaohsiungs mayor in December 2018 helped to re-energize the Nationalists, who lost their hold on power four years ago. They had governed since their forces fled to Taiwan from the mainland with the communists civil war victory in 1949.

Shortly after taking office, Han traveled to China to sign deals to sell 5.2 billion New Taiwan dollars ($165 million) worth of Taiwanese agricultural products. He also met with leading officials for relations with Taiwan, including the head of the Cabinets Taiwan Affairs Office, Liu Jieyi, and ranking Communist Party officials in Hong Kong.

That reinforced his image as a candidate backed by and friendly to Beijing. While Han is not expected to win, his party is fighting hard to overturn the DPP’s’majority in the 113-seat parliament, officially known as the Legislative Yuan.

A win by Tsai is anticipated to draw more diplomatic, economic and military pressure from Beijing on the island, in a continuation of President Xi Jinpings campaign to compel her administration to endorse its insistence that Taiwan is a part of China.

Tsai has refused to do so, maintaining that Beijing has no claim over Taiwan, although her government has repeatedly called for the reopening of talks between the sides without preconditions.

Since its transition to full democracy beginning in the 1980s, Taiwan has increasingly asserted its independent identity from China even though it is not recognized by the United Nations or any major nation.

The island of more than 23 million people exercises all the roles of a sovereign nation, issuing its own passports, maintaining its own military and legal system and serving as a crucial hub in the global high-tech supply chain.

If reelected, Tsai will face challenges in trying to reform the government and economy and push through unpopular cuts in generous civil service pensions.