Mr Chen and the vice-president, Annette Lu, were shot and wounded amid a cacophony of firecrackers as they waved at supporters from an open-top vehicle on the final day of their re-election campaign.

They were taken to hospital, but released after treatment. Doctors - who were among the presidential entourage - said they removed a bullet from Mr Chen's stomach, and later showed pictures of a 4.5-inch scar across his abdomen. Ms Lu was shot in the right knee.

Police think the attack was carried out by two people with pistols. They offered a £50,000 reward for information that might lead to their arrest.

Taiwan's rival political leaders branded the shooting the saddest incident to date in the island's young democracy, and cancelled election rallies planned for last night. They called on their supporters to remain calm.

With the mood still uncertain late last night, the government put riot police on standby around the presidential palace in central Taipei.

The authorities in Beijing appeared unsettled by the news and blocked everything but a terse statement about the shooting for several hours on mainland websites.

But today's election will go ahead and many analysts believe that Mr Chen could benefit from a sympathy vote.

It is unclear, however, whether this will enable him to hold on to power. Most opinion polls have shown him trailing the rival Kuomintang party candidate, Lien Chan, by about 5%. President Chen leads the Democratic Progressive party, which is pushing for increased independence from the Chinese mainland.

He has enraged Beijing and upset allies in Washington by tying his re-election attempt to Taiwan's first referendum, also being held today, which asks the 16.5 million voters if they support the purchase of an upgraded anti-missile system and the opening of talks with the ruling Communist party in Beijing.

China fears the referendum is a dry run for a vote on independence which, it warns, would spark war. Beijing regards the island as a renegade province.

With more at stake than in any previous election, the campaign has been marked by dirty tricks, huge expenditure and the mobilisation of millions of supporters in noisy, colourful and - until now - peaceful rallies.

The shooting happened yesterday afternoon in the centre of Mr Chen's home town of Tainan, the island's fourth largest city. He and Ms Lu were escorted by nine police motorcyclists but were not wearing bullet-proof vests. They were clearly exposed as they stood in their vehicle, giving thumbs-up signs to crowds waving the green flags and banners of the DPP.

There is no film of the attack, but television stations have broadcast pictures of the president's cavalcade passing through roads lined with noisy firecrackers shortly before the incident. Video film shot shortly after the attack shows Mr Chen bleeding from the stomach but still waving to the crowds, Ms Lu holding her leg, and a bullet hole in the front windscreen.

Some political analysts said the attack could save the president's political life by bolstering support for his "pan-green" alliance.

"It's possible that this could swing the election," said Arthur Ting of National Cheng Kung University. "It will strengthen the resolution of the pan-green's core supporters, and there will also be a sympathy effect among undecided voters."

Police said they had no suspects and refused to speculate on a possible motive.

Amid wild rumours - ranging from an assassination attempt by Beijing's agents to a set-up by Mr Chen himself - political leaders urged their supporters to restrain from rash actions.

"We were very, very shocked," said the opposition candidate, Mr Lien, who visited the president last night. "We strongly condemn any form of violence."

Beijing has yet to comment on the attack, but many critics of the mainland say the regime - which has no record of attempting assassinations in its 55-year history - is unlikely to be responsible.

"There are several thousand Chinese agents operating in Taiwan," said Joseph Wu, deputy secretary general to the president. "If it turns out that China is involved, it would have a serious impact on cross-straits relations. But the likelihood is low because China doesn't want a forceful resolution of the cross-straits situation."

However, voters on both sides in this highly politicised island have been quick to accuse each other - and Beijing - of dirty tricks.

"I think it was the Chinese," said Chin Ping, a Chen supporter who went to an impromptu rally last night outside the DPP's headquarters in Taipei. "China has been trying to interfere with our democracy. But it won't work. Chen will win for sure now. He will be our president again."