TAIWAN:WATCHING THE count of ballot papers begin at the Rixin Elementary School in Taipei, it was clear Taiwan's nationalist Kuomintang was going to regain by a landslide the power the party lost eight years ago, paving the way for easier relations with Beijing.
At the close of voting in the only truly democratic elections on a Chinese territory, the boxes of votes were carefully opened, the seals removed and an election agent read out the numbers which indicated whether people had voted for the KMT candidate Ma Ying-jeou or Frank Hsieh, candidate of the current presidential party.
"Can Can" music filtered out over the speakers at one point, something to do with the school timetable, as the number "two" was heard ever more often. Even in this part of town, a stronghold for Mr Hsieh's party, it was obvious Mr Ma was on a winner.
Within hours it was confirmed - Mr Ma (57), a Harvard-educated lawyer who was formerly mayor of Taipei and who campaigned on a platform of closer business and political links with China to help boost the economy, had won.
Mr Hsieh, representing the Democratic People's Party (DPP) of incumbent president Chen Shui-bian, was left to pick up the pieces after a difficult campaign.
But too much cordiality is unlikely, even if Beijing was hoping for a KMT win.
The president-elect's rhetoric in his early remarks was certainly tough on China. "They remain the greatest security threat. Taiwan's identity has to be respected, and we have to negotiate with each other on equal footing," said Mr Ma.
China considers Taiwan a renegade province since the Nationalist KMT under Chiang Kai-shek fled there after losing the 1949 civil war, and Beijing has long threatened to take it back by force.
Against this background, this month's scenes of a violent crackdown in Tibet rattled nerves in Taiwan, where voters feared that Taiwan could be next. Mr Hsieh had attempted to make political capital out of the riots but in the end corruption reports and worries about the economy forced the vote in KMT's favour.
"The economy is my number one priority. Rice is more important than anything else," said Wu Jin-hun, a taxi driver. "Tibet and Taiwan are different issues because of their different historical backgrounds. It's too simplistic to lump them together," said Mr Wu.
The KMT ran Taiwan as a one-party state for 51 years and had been trying to regain the presidency since losing power in 2000 and again in 2004.
Although the KMT was the Communist Party's civil war enemy, these days the KMT leadership wants more trade with China and supports reunification.
The Tibet crackdown leaves Mr Ma with a delicate balancing act, trying to extend a hand of friendship across the Strait of Taiwan, while not being seen as willing to compromise Taiwan's security.
"What I can promise voters is that we will not negotiate the issue of unification and we will not support de jure independence. And we will oppose the use of force across the Taiwan Strait," he said.
But there would be no peace talks until Beijing removes missiles aimed at Taiwan, he said. China and Taiwan are still technically at war, and no peace treaty was ever signed. Taiwan is heavily armed with US weaponry, while China is spending big on upgrading its military.
This month, China's president Hu Jintao offered peace talks as part of the "one China" principle, which contends the island and the mainland are part of a single sovereign country, a concept Taiwan's current government has rejected.
Cross-strait economic ties are close, and Taiwanese companies have invested billions of dollars in China, drawn by low costs and a common culture. China is Taiwan's biggest trading partner and hundreds of thousands of Taiwanese live in the People's Republic.
While Mr Ma is expected to seek to deepen those ties, his line was combative and particularly forthright on the Dalai Lama, with his remarks likely to raise hackles in Beijing.
Mr Ma said the Dalai Lama was "more than welcome" in Taiwan and held out the prospect of an Olympic boycott by Taiwan.
Beijing's reaction to the protests in Tibet had undermined much of the goodwill that mainland China had built up in the island of 23 million people in the wake of a more conciliatory line in recent months.
One issue during the election was the question of the Taiwan campaign for UN membership.
China, the US, Japan and many European states, including Ireland, have protested against the bid, which is pointless anyway as China has a veto on the UN Security Council.
China sees it as a plebiscite on independence, but for many Taiwanese it is a vote aimed at raising Taiwan's international profile.