Fireworks lit up the sky over Ma Ying-jeou's headquarters, and cheering supporters put up victory posters before the former Taipei mayor climbed on stage and declared victory.
"People want a clean a government instead of a corrupt one," said Ma, also a former justice minister. "They want a good economy, not a sluggish one. They don't want political feuding. They want peace across the Taiwan Strait. No war."
Across town, a crying crowd gathered at the campaign office for ruling party candidate Frank Hsieh, a former premier.
"Don't cry for me today," Hsieh said in his concession speech. "Although we lost the election, we have a more important mission. The torch of democracy should not be extinguished."
Ma won 58 percent of the votes compared to 41.5 percent for his challenger, according to the Central Election Commission. Turnout was 76 percent, the commission said.
Ma and Hsieh have both said they want a less confrontational relationship with China. But they were divided on how best to deal with Beijing, which presents both a huge opportunity for the island's powerful business community and a looming threat to its evolving democracy.
Ma said he favors stronger economic ties between China and Taiwan, but that he wants to maintain the status quo politically. Therefore it is less likely that there will be a political unification, CBS News correspondent Barnaby Lo reports.
His main proposal is for China and Taiwan to have a so-called "One-China common market," reports Lo. It is patterned after the European Union where there is a free-flow of people and products.
Such a union could mean laborers, travelers, flights and goods would pass more freely between China and Taiwan.
Taiwan and the mainland split amid civil war in 1949, but China still considers the island to be part of its territory. Beijing has threatened to attack if Taiwan rejects unification and seeks a permanent break.
The Central Election Commission also said two referendums calling on the government to work for the island's entry into the United Nations failed. China had warned that the referendums threatened stability in the region.
Ma has based his campaign on promises to reverse the pro-independence direction of outgoing President Chen Shui-bian and leverage China's white-hot economic boom to re-energize Taiwan's ailing high-tech economy.
He has proposed a formal peace treaty with Beijing that would demilitarize the Taiwan Strait, 100-mile-wide waterway that separates the two heavily armed sides. But he has drawn the line at unification, promising it would not be discussed during his presidency.
Economically, he wants to lower barriers to Taiwanese investment on the mainland - it already amounts to more than $100 billion - and begin direct air and maritime links between the sides.
Ma is particularly interested in expanding the China-Taiwan high-tech connection, which every year sends billions of dollars' worth of Taiwan's advanced components to low-cost assembly plants along China's rapidly developing east coast.
That interest resonated with businessman Wang Wen-ho, who cast his ballot for Ma at a Taipei high school.
"The DPP has failed to cope with China's growth in eight years," he said. "We need to engage the mainland to improve the economy."
But George Tsai of Taipei's Chinese Culture University said improved relations with China will likely come slowly.
"Even if Ma can manage to resume cross-strait dialogue and build mutual trust with Beijing, it probably will not happen in the first two years," Tsai said.
Hsieh has accepted his party's independence platform, but without the special vehemence of Chen, whose support for separatist policies constantly incensed China and caused grave concern in the United States, Taiwan's most important foreign partner.
Hsieh's party had used the last day of campaigning to fan outrage over China's handling of protests in Tibet, warning the crackdown could be replicated in Taiwan.
He also had warned voters that if he loses, Ma's party will control both the presidency and the legislature, creating a dangerous imbalance of power.
Taipei voter Chen Wei-ting, a 32-year-old banker, shared the same concern and voted for Hsieh. "I'm worried that if one party had the legislature and presidency, there could be a lot of trouble."