Taiwan’s independence-leaning opposition leader Tsai Ing-wen became the island’s first woman president on Saturday after the ruling party admitted defeat.
However, a public apology by a teenage K-pop singer Chou Tzu-yu for waving the Taiwanese flag on Korean TV has brought the focus on to difficult relations with mainland China.
Ms Chou, a member of the South Korean pop group Twice issued a public apology for holding up the Taiwanese flag, leading to accusations of being a Taiwan independence activist.
“I’m sorry ... there is only one China, Taiwan and China are part of the same country,” Ms Chou said in a video released by her management company. She also bowed deeply and apologised for “hurting the feelings of the Chinese people”.
The island of 23 million people has been self-ruled since the Kuomintang nationalists under Chiang Kai-shek fled to the island in 1949 after defeat by the Communist Party in the civil war.
China does not recognise Taiwan as a separate country and sees it is part of its territory, to be returned by force if it should ever try to claim independence.
The flag-waving gesture led to a concert in mainland China being cancelled and Chinese smartphone vendor Huawei cancelling her endorsements.
There was support for the teenage singer across the political spectrum.
"Using the Taiwan flag to express national identity is a very legitimate thing that should never be suppressed," said Ms Tsai. "I believe that many Taiwanese are very sad, angry."
The apology was expected to galvanise support for Ms Tsai and the Democratic Progressive Party (DPP) because of their support for more autonomy for Taiwan. Local TV showed interviews with people rushing to vote for the DPP because they were angry at the way Ms Chou had been treated. Voter turnout was better than expected because the expected rain held off.
President Ma Ying-jeou also defended her.
“Citizens who love Taiwan are never pro-independence supporters. We should all support them for loving Taiwan,” he said.
There was also widespread support on the streets of Taiwan and online.
"Yesterday, Chou Tzu-Yu was forced to apologise by China because Taiwan flag showed in her music video. She is like a captive and trembling to say Taiwan is a part of China. As a Taiwanese, I feel pained and angry. She is just a child," Laurence Huang wrote on Facebook, the most popular social media in Taiwan which is banned in mainland China.
Another wrote on Facebook: “Personally I think there’s no need for Chou Tzu-yu to apologise ... she’s holding the correct flag, and claiming the correct nationality as a true blue Chinese.”
Yen Cheng-fu wrote: “She did the right thing and lift the flag, she didn’t do anything wrong,” with a message encouraging Taiwanese to get out and vote.
The controversy began after Ms Chou was described on social media by the pro-Beijing Taiwanese singer Huang An as a “pro-Taiwanese independence” activist. Mr Huang was widely criticised online, and there were reports that he was seeking protection for his return to Taiwan for Chinese New Year.
Ms Tsai will be thrust into one of Asia’s toughest and most dangerous jobs, with China pointing hundreds of missiles at the island, decades after losing Nationalists fled from Mao Zedong’s Communists to Taiwan in the Chinese civil war.
She will have to balance the superpower interests of China, which is also Taiwan’s largest trading partner, and the US with those of her freewheeling, democratic home. Ms Tsai risks antagonising China if she attempts to forcefully assert Taiwan’s sovereignty and reverses eight years of warming China ties under Mr Ma.
Additional reporting: Reuters