President Chen Shui-bian's victory in Saturday's election gives him four more years in power to carry on his mission to change Taiwan and its relations with China.
By Angus Foster
BBC News Online, Taipei
But the narrowness and style of that victory means he is in danger of inheriting a country divided.
The opposition claims Chen benefited from public sympathy
Even before the result was clear, the opposition alliance led by the Kuomintang (KMT) was complaining the election was not fair.
KMT activists alleged that the shooting of Mr Chen and Vice-President Annette Lu on Friday was staged, in order to swing the vote.
Far-flung conspiracy theories are not new to Taiwan elections, and these allegations may well be forgotten as more details emerge of the apparent assassination attempt.
But what will remain is a deep bitterness among KMT supporters that, as they see it, the shooting incident robbed them of victory.
Internal KMT polls were giving them a clear lead three days before the election. It is unclear how many people were swayed into voting for Mr Chen because of what happened. However, KMT supporters were convinced that enough voters changed their minds to alter the result.
Alice Chu, a supporter at KMT headquarters, said: "People feel very angry. TV yesterday was reporting Chen's accident all day, all night, of course it made a difference.
Lien says that the election was unfair
"The whole thing is unfair."
The charge, and the allegations that the shooting was staged, were furiously denied by Mr Chen's Democratic Progressive Party (DPP), which said it won the election fairly.
Presidential adviser Joseph Wu said: "Some people might speculate that we got a sympathy vote, but a (private) opinion poll conducted before the shooting showed us 2% ahead".
The narrowness of Mr Chen's victory - he won by less than 30,000 votes, compared with 300,000 four years ago - also suggests he will have to move forward carefully. Although he increased his share of the vote from 39.3% to 50.1%, he can still hardly claim a sweeping mandate.
This is probably most clearly the case in Taiwan's relations with China, which still regards the island as its territory and threatens to invade if Taiwan ever declared independence.
Mr Chen lost a referendum that was put to voters at the same time as they cast their presidential ballot, on how to deal with China.
Not enough voters supported the proposals for them to be passed. That result backed up opinion poll and anecdotal evidence that suggests Taiwan's people are also deeply divided over how to deal with China.
On one side are Mr Chen and his DPP, who favour standing up to China and eventual independence.
On the other are a large number of people who favour the status quo and are wary of doing anything to upset China, and a smaller group who favour reunification.
Mr Chen now faces the extremely difficult task of finding some kind of middle course - a concession his opponents do not think he is capable of making.
"Tensions probably will rise," said KMT legislator John Chang.
"Mr Chen will try his best to get his name in the history books, and that means moving Taiwan closer to independence," he said.
Mr Chen's critics had argued all along that the referendum was designed to help his re-election, and losing it may not worry him.
But the referendum's real significance is that, by being the first in Taiwan's history, it established the legitimacy of such an exercise, and makes it possible for Mr Chen to return to the people with other questions.
Not everyone is likely to be as ecstatic as these Chen supporters
China, which has long been suspicious of his intentions, fears he is positioning himself to hold a referendum on Taiwan's constitution, which his DPP argues is out of date and leaves Taiwan with a mixed presidential and parliamentary system.
But many observers - including military analysts in Beijing - believe the constitution argument is another device whereby Mr Chen will move Taiwan closer to formal independence.
If so, the question is how far China allows him to move before it reacts with more than angry words and, as happened in 1996, missile tests.
Mr Chen's main adviser on mainland affairs, Tsai Ing-wen, said she hoped Beijing would change its stance towards Mr Chen now he had four more years in office.
During his first term, China laid down preconditions for talks which Mr Chen was unwilling and politically unable to meet, so relations have become frozen.
"Taiwan seems to be moving away from them," said Ms
Tsai, referring to Beijing's leaders.
"They should look at what they have done wrong in the past four years, and that is their refusal to talk," she said.
But it is extremely difficult to see how China's suspicions of Mr Chen can be allayed.
Taiwan holds legislative and local elections over the next two years, and if he is to mobilise the DPP support base, Mr Chen needs to talk tough on China.
And if he presses ahead with a referendum on the constitution - which could be held as early as 2006 - China is likely to speed up its missile deployment, not press for talks.
"We are in a very dangerous domestic and international game," said political analyst Yu-shan Wu.
"Domestically we have ethnic tensions building up, and internationally we have China's growing arsenal of missiles pointing against us.
"But Taiwan is a great survivor, it continues to do wonders. We could yet muddle through," he said.