Beijing (CNN) -- Taiwan's incumbent President Ma Ying Jeou was re-elected Saturday in an election seen as critical to the future of an economy that has boomed thanks to warmer ties with China.
With all votes counted, the Central Election Commission said Ma, of the ruling Kuomintang Party, had 51.6%. Challenger Tsai Ing-wen of the Democratic Progressive Party had 45.6% and James Soong of the People First Party had 2.8%.
U.S. President Barack Obama congratulated Ma on his victory, saying "Taiwan has proven to be one of the great success stories in Asia."
Ma will take office May 20.
Ma advocates maintaining the status quo with China under the "1992 Consensus," a tacit and ambiguous agreement reached 20 years ago between Beijing and Taipei under which both sides agreed on the principle of "one China" without agreeing on how it is to be defined or interpreted.
The Consensus has been the basis for cross-strait dialogue that has led in recent years to the unprecedented warming of ties between Taiwan and China.
Tsai, seeking to become Taiwan's first female president, rejects the 1992 Consensus. She has called instead for a yet-undefined "Taiwan Consensus" that leads some in Beijing to suspect her of pushing a pro-independence agenda.
As many as 200,000 people, most of them mainland China-based Taiwanese, had been expected to return to Taiwan for the vote. Taiwan does not allow absentee voting and the growing political clout of Taiwan's expatriate businessmen was expected to be a determining factor in the election.
Companies chartered planes to Taiwan so their employees could return to cast ballots, said Professor Ray-Kuo Wu of Fu Jen University.
"Traditionally, business leaders have shied away from commenting on political issues," said Wu. "But there's a recognition that there's a need to continue with the 1992 Consensus and that it's the best choice for Taishang in terms of the prosperity of Taiwan."
Tsai's campaign to paint Ma's pro-Beijing policies as selling out Taiwan's sovereignty may have cost her votes, analysts say.
Although Taiwan's formal name is "Republic of China," Taiwan has considered itself independent from the People's Republic of China since 1949 when the Kuomintang or Nationalist government lost the Chinese civil war and withdrew to Taiwan.
Still, Beijing considers Taiwan a breakaway province and has never ruled out the use of force to achieve reunification.
If China were to use military force, the United States -- which does not support Taiwan independence -- could intervene under the Taiwan Relations Act, a 1979 law declaring that peace and stability in the area are in U.S. interests. That raises fears of a much wider conflict were China to intervene.
U.S. State Department spokeswoman Victoria Nuland congratulated Ma and called the election the "latest milestone" for Taiwan's democracy.
"We share with the Taiwan people a profound interest in the continuation of cross-Strait peace and stability," she said in a statement Saturday.
Obama said that peace and stability has also benefited U.S.-Taiwan relations.
Relations between Taiwan and Beijing softened in 2008 when the two governments opened trade, transport and postal services, allowing direct links for the first time. What had once been a daylong ordeal, where flights to Beijing had to be routed through Hong Kong, has become a short hop across the Taiwan Strait.
Tourism has strongly benefited, with 30% of the 6 million foreign visitors to Taiwan coming from mainland China. Exports are also enjoying a bonanza.
For its part, mainland China, also drawn by the economic prospects of closer ties, has been content not to disturb the status quo, in marked contrast to earlier elections.
In 1996, it reacted angrily to the first direct presidential elections in Taiwan, believing that the favorite to win that poll, Lee Teng-hui, was advocating a separate identity and formal statehood.
Beijing had already conducted missile tests in the Taiwan Strait aimed at intimidating voters and the United States moved two aircraft carriers into the region. Beijing's posturing created the opposite effect, however, and Lee won the poll handsomely.
Since then, Beijing has taken a hands-off approach, not wanting to upset what is settling into a strong economic relationship.
"The Taiwanese government has stated that the election is their domestic affair and, so far, there has been nothing overt in terms of opposition from Beijing's side," says Wu.
CNN's Peter Shadbolt and Journalist Antony Chen contributed to this report.