Taiwanese voters have re-elected incumbent president Tsai Ing-Wen in a landslide election that serves as a sharp rebuke to Beijing and its attempts to intimidate and cajole Taiwan into China’s fold.

Winning more than 8m votes, the most any presidential candidate has garnered since Taiwan began holding direct elections for the position in 1996, Tsai easily defeated her opponent Han Kuo-yu, whose Kuomintang party promotes closer ties with China.

“This election is about whether or not we choose freedom and democracy,” Tsai said, delivering her victory speech in Taipei. “We must work to keep our country safe and defend our sovereignty.”

More than 14 million citizens travelled to their hometowns to vote in the presidential and legislative election on Saturday, casting ballots in schools, temples, parking lots and community centres. Tsai’s party also maintained its majority of seats in the legislature.

Tsai’s win, coming after major losses for her Democratic Progressive party (DPP) in the 2018 midterm elections, marks a dramatic comeback helped by a slowly improving economy, missteps by the opposition and mass protests in Hong Kong that exposed what coming under Beijing’s authority might look like to many young Taiwanese.

Increased intimidation from China appears to have helped Tsai, who opposes unification with the mainland. In the run-up to the election, China twice sailed its new aircraft carrier through the Taiwan strait. In a speech addressed to Taiwan last year, Chinese leader Xi Jinping said Beijing would not rule out the use of force to bring Taiwan under its authority.

During Tsai’s first term, Beijing cut off dialogue with Taiwan, persuaded several of its few remaining allies to drop recognition of it and halted independent travel of Chinese tourists.

“This election result carries an added significance. They have shown that when our sovereignty and democracy are threatened the Taiwanese will shout our determination even more loudly back,” Tsai said.

'We need more dreams': Taiwan's 'Squad' rallies youth ahead of election Read more

“With each presidential election, Taiwan is showing how much we cherish our free democratic way of life and how much we cherish our nation,” she said.

Taiwan came under military rule by the Kuomintang (KMT), formerly the governing power of China, after its leaders fled the country in 1949 ahead of advancing communists. Since martial law was lifted in 1987, it has gradually evolved into one of the most vibrant democracies in Asia. Although Taiwan enjoys de facto independence, it is recognised as a state by only 15 other countries.

Han, Beijing’s preferred candidate, conceded the election by saying he had not “worked hard enough”. “No matter what happens, I still hope to see a united Taiwan … I urge president Tsai Ing-wen to focus on giving people a life where they can live safely and happily,” he said.

Han, who had campaigned on the slogan “Taiwan safe, people rich,” backed away from calls for closer ties with China after it appeared to hurt his popularity. In November, when his party released a list of pro-unification party members for at-large legislative seats, support for him dropped.

Supporters of Han, a populist candidate who has drawn comparisons to Donald Trump, were grim-faced and some were crying at the KMT’s headquarters in Taipei.

“This is just a huge loss for the [Chinese communist party]. The CCP is likely to respond in terms of doubling down on their current strategy of trying to punish Taiwan as much as possible, but at the end of the day it shows its just going to push people toward a green president,” said Lev Nachman, a PhD candidate at the University of California, Irvine, focusing on Taiwan. Tsai’s party and those aligned with it are considered part of the “green camp”.

Supporters of Tsai said the result was proof of the maturation of Taiwan’s democracy. In the lead-up to the election, citizens were flooded with fake news and disinformation campaigns that many suspected to have come from China.

“This is a test of how much democracy and freedom have developed in Taiwan. People can judge right from wrong, whether the news is true or false, and whether or not they will support politicians who do little but put on a show,” said Tek Dee, 36, who voted in Taipei. “It’s a rejection of China’s attempts to swallow up or influence Taiwan,” she said.

Others believe Han was the victim of smears from the media, proof that Taiwan has become overly politicised. “This election is a battle between truth and evil. If Han loses, I will not believe in justice any more,” said Xu, a lecturer at a local university in Kaohsiung who asked to only give her surname.

Many have described the election as a generational standoff, with older voters supporting Han and the KMT’s policies of closer economic ties with China. Younger Taiwanese have skewed toward Tsai, who campaigned heavily on pledges to protect Taiwan’s democracy.

“Tsai’s victory dispels the narrative Beijing has been pushing that Taiwan’s economic and political future is reliant on China,” said Jessica Drun, a non-resident fellow at the Project 2049 Institute.

While Tsai has positioned herself as a protector of Taiwan’s sovereignty, some believe she and her party have not gone far enough. Tsai has said she will maintain Taiwan’s current de facto sovereignty and oppose any form of “one country, two systems” – the framework employed in Hong Kong that has been floated as a possible model for Taiwan.

The foreign minister, Joseph Wu, said this week that Tsai’s government would not disrupt the status quo with a formal declaration of independence.

“If today she said she was for Taiwan independence, I would immediately give her my vote,” said 22-year-old Huang Kaicheng, who recently graduated from a university in Taipei.

Huang voted for Han but believes neither party has offered much in the way of policy proposals. “Whoever we elect, it won’t make a difference,” he said.

The Guardian view on Taiwan’s election: an extraordinary comeback – then what? | Editorial Read more

Tsai’s win also comes after another election result that embarrassed Beijing: the landslide victory of pro-democracy candidates in Hong Kong’s district council races in November.

Response to Taiwan’s election was muted in China, with the country’s state council for Taiwan affairs issuing a statement that Beijing “resolutely opposes any separatist attempt for ‘Taiwan independence’” and maintains its support for “peaceful reunification.”

Censors appeared to have blocked some of the discussion of the race on Weibo. But internet users left comments under a report on Tsai’s win by state news agency Xinhua, accusing domestic media of misleading them.

“We can’t see the real information, so the election results in Taiwan and Hong Kong are always unexpected,” one wrote. “How did this happen?” another said.

Additional reporting by Wu Pei-lin and Lillian Yang