Protests in Taiwan have continued into the night as thousands demand a recount of votes after incumbent Chen Shui-bian narrowly won the presidential election.
Opposition supporters marched on the presidential palace
Ballot boxes have been sealed, but a court decision on whether the result should stand has not yet been made.
Mr Chen was re-elected with a majority of less than 30,000 out of 13 million votes cast, a day after surviving an apparent assassination attempt.
Opponents have raised doubts about the attack and the conduct of the election.
Defeated presidential candidate Lien Chan called for a recount and demanded answers to the many unanswered questions about Friday's mysterious attack on President Chen and Vice-President Annette Lu.
Correspondents say conspiracy theories are being aired that the election-eve shooting might have been a publicity stunt and there are questions about the number of invalid ballots.
Chen Shui-bian: 6,471,970 (50.11%)
Lien Chan: 6,442,452 (49.89%)
337,297 invalid ballots
Source: Central Election Commission
The total of 330,000 rejected votes was three times that of the last presidential election in 2000, though this time a group opposing both main parties had campaigned for voters to submit blank papers as a protest.
Opposition supporters held angry protests in various cities, accusing the government of dirty tricks and demanding the courts intervene to order a recount.
Clashes broke out as protesters tried to break through police lines to reach court buildings in both Taichung and Kaohsiung.
In the capital, Taipei, up to 10,000 people gathered outside the presidential palace.
Massed ranks of police in full riot gear and a barbed-wire barricade surrounded the compound as the noisy but peaceful demonstration went ahead.
The BBC's Chris Hogg in Taipei says the nationalist Kuomintang party supporters say they feel cheated, but it could be two weeks before Taiwan's High Court decides whether there should be a recount.
The High Court ordered all ballot boxes sealed to preserve evidence following a request by Kuomintang lawyers.
Officials said the island's high court could select a judge to rule on whether a recount is needed as early as Monday.
Internal polls by both parties in the days before the election had suggested their candidate would secure a narrow win.
Mr Chen's Democratic Progressive Party has moved to try to dispel the feeling that the shooting at a rally in Tainan was rigged.
It released photographs showing Mr Chen being operated on for his injuries, which turned out to be relatively minor.
Despite the president's election victory, he is being seen as having suffered a significant defeat with the failure of a referendum on relations with China.
He had sought support for proposals that Taiwan should seek peaceful resolution of differences with Beijing while upgrading missile defence systems but too few voters participated to make the result valid.
President Chen called on China to accept his re-election and to remove the missiles aimed at the island Beijing considers a renegade province.
Although China has not directly commented on the election result, it condemned the referendum in Taiwan, which it said was an attempt to "split the motherland".