Taiwan's President Tsai Ing-wen has secured a second term after sweeping to victory in the island's hard-fought election.
With almost all votes counted, Ms Tsai had about 58% of the vote, well ahead of her rival Han Kuo-yu.
The election was dominated by Taiwan's relationship with China.
Ms Tsai favours the status quo, and does not want closer ties with Beijing, while Mr Han promised to ease bi-lateral tensions.
The BBC's John Sudworth in Taiwan says the result is a major snub for Beijing. Its authoritarian vision of greater-China unity has been rejected wholeheartedly, he adds.
Declaring victory, Ms Tsai told supporters: "Taiwan is showing the world how much we cherish our free democratic way of life and how much we cherish our nation."
China has claimed sovereignty over Taiwan since the end of the Chinese civil war in 1949. It says Taiwan must eventually be reunited with China, by force if necessary.
In her victory speech, Ms Tsai said China should now drop that threat.
"Peace means that China must abandon threats of force against Taiwan," she said in the capital Taipei.
"I also hope that the Beijing authorities understand that democratic Taiwan, and our democratically elected government, will not concede to threats and intimidation."
Mr Han, the Kuomintang party candidate, had earlier admitted defeat as the results became clear.
"I have called President Tsai to congratulate her. She has a new mandate for the next four years," he told a crowd in the southern city of Kaohsiung.
Ahead of the vote, Ms Tsai was leading in the polls – which some observers attributed to her support for the protests in Hong Kong.
Her stance was popular with those who fear Taiwan being overtaken by mainland China.
President Tsai insists Taiwan's future should be decided by its 23 million people.
Voters were also choosing the next members of the Taiwanese legislature, where Ms Tsai's party has had a majority.
About 19 million people were registered to vote in Saturday's election.
What is Taiwan's status?
For practical purposes, Taiwan is an independent state – it has its own elected government, constitution and military.
But China refuses to have diplomatic relations with any country that recognises Taiwan as a sovereign nation.
All but a handful of countries have picked Beijing, but most maintain an ambiguous relationship with Taiwan through trade. The US is also legally bound to supply Taiwan with the means to defend itself.
Where did the candidates stand on China?
Ms Tsai wants to "maintain the existing mechanisms", according to her website – meaning she does not want to compromise Taiwan's de facto independence.
In a speech on the Hong Kong protests in June, she said "anyone who tries to undermine Taiwan's sovereignty and democracy, or use them as political bargaining chips, will fail".
She had also rejected Taiwan ever operating under the "one country, two systems" political system used in Hong Kong since it returned to China in 1997 – calling it "not viable".
Speaking to the BBC this week, she said Taiwan should "learn a lesson" from Hong Kong: "If we don't insist [on maintaining Taiwan's independence], we'll be losing everything we have now."