Mistakes by polling station staff gave former Tory health minister, Gerry Malone, another chance to beat the Liberal Democrats in the battle for the parliamentary seat of Winchester.
Two high court judges today ruled they had 'no choice' but to declare void the knife-edge May 1 election which Mr Malone was declared to have lost to Liberal Democrat candidate, Mark Oaten, by just two votes.
The court's decision, which opens the way for a by-election, will now be reported to the speaker of the house of commons and parliament will set a date for a new poll.
Mr Malone's QC, Richard Price, had earlier told the court polling station staff had been 'in breach of their official duty' by failing to put the 'official mark' on 55 ballot papers which would otherwise have been counted as valid votes but had to be declared void.
After two recounts Mr Oaten had been declared the with 26,100 votes against Mr Malone's 26,098, the smallest margin of victory in a parliamentary election on record.
Mr Price said a count of the 55 void votes had revealed that 22 of them had been cast for Mr Malone and 18 of them for Mr Oaten. Had they not been declared void, Mr Malone would himself have retained his seat by two votes.
'It is clear the election result was affected by the failure to stamp the relevant ballot papers,' he told Lord Justice Brooke and Mr Justice Gage, adding that the court had 'no choice' but to declare the election void.
Mr Malone now accepted that the returning officer had rightly declared two other disputed votes 'void for uncertainty' and there was no dispute that the election had been carried out 'substantially in accordance with election law,' counsel added.
David Pannick QC, for Mr Oaten, told the judges: 'It is very unfortunate that because of the breaches of the election officials, a by-election must take place.
But he added: 'Mr Oaten of course looks forward to being returned again as the Liberal Democrat member of parliament for Winchester in a manner which cannot be subject to legal challenge.'
Timothy Straker QC, for the returning officer, accepted that the 'admitted breaches of the official did effect the result,' and a by-election was inevitable.
Lord Justice Brooke said that, in the circumstances, the court was 'bound' to declare the election void.