Nineteen million voters go to the polls in Taiwan on Saturday to choose if they want closer ties to mainland China, or if they want to confront Beijing. China hopes to incorporate Taiwan in its “one country, two systems” project, but has become increasingly unpopular with islanders because of Beijing's treatment of protestors in Hong Kong.
Taiwan's presidential rivals will hold mass rallies on Friday in a final push to convince voters ahead of a closely watched election that looks set to infuriate the authorities in mainland China.
Beijing views Taiwan as part of its territory and has vowed to retake the island, by force if necessary.
But China is also Taiwan's largest trade partner.
President Tsai Ing-wen, who is seeking a second term, has pitched herself as a defender of Taiwan's liberal values against the increasingly authoritarian shadow cast by Beijing under President Xi Jinping.
In 1949, Chiang Kai-chek fled to Taiwan with 2 million followers, after being beaten in a brutal civil war that was won by Mao Zedong's Communist Party (CCP).
Chiang's Nationalist Kuomintang (KMT) established a dictatorial rule on the island, which lasted till 1991.
After that, opposition parties were allowed and Taiwan became a democratic, liberal state – albeit increasingly isolated, as Beijing successfully managed to snatch away all but 15 of Taipei's diplomatic allies over the years.
Two main policy lines quickly emerged. The main opposition party, the Democratic Progressive Party (DPP), promoted complete independence from China, while the KMT maintained that China should be unified.
After the DPP won the elections it officially rejected this “one China principle” in 2016.
Hong Kong as example for Taiwan
When the People's Republic of China took over Hong Kong from the UK in 1997, it promised that the territory could keep its capitalist system and its semi-democratic autonomy. Gradual improvements were promised, with universal suffrage within 50 years.
This idea, dubbed “one country, two systems” by China's leader Deng Xiaoping, was intended to eventually lure Taiwan into the fold.
But it didn't work out as Beijing had hoped.
Inhabitants of Hong Kong, who were already critical of the British colonial system, had grown skeptical of Beijing's rule after the 1989 Tian'anmen massacre, when the People's Liberation Army crushed peaceful demonstrators, killing hundreds.
When Beijing started to gradually withdraw promises of greater democracy, and eventually dictated that it would continue appointing candidates for Hong Kong's top position of Chief Executive, popular protest burst out, first in the shape of the “Occupy Central” and “Umbrella” movements, and, early last year, spiraling into the almost daily protests and violent chaos after the introduction of a controversial extradition law. Hong Kong's Beijing-controlled leadership did not give in to most of the protesters' demands.
In Taiwan, DPP leader Tsai Ing-wen made the Hong Kong issue a campaign slogan “Today Hong Kong, tomorrow Taiwan,” and DPP propaganda even went as far as declaring “promoting unification” an act of “treason”.
As the same time, Beijing had come to regard its old arch enemy the KMT as a dialogue partner that shared the same ideals: eventual reunification. The KMT is being supported by large parts of the business community that has invested heavily in Mainland China while Taiwan's economy became increasingly dependent on mutual trade and tourism.
But the pictures of chaos in Hong Kong and unrelenting stubbornness from Beijing don't go down well with Taiwan's voters.
On Friday evening, the candidates hold their last mass rallies to try and whip up support.
Polls open at 08:00 am local time on Saturday morning, and close at 16:00. Exit polls are expected in the early evening.