When polling stations across Scotland closed on the evening of 3 May, 2007, the public - and seasoned political journalists - had every reason to expect that, by the following morning, it would all be over.
By Andrew Black
BBC Scotland news website
It became clear as the night went on that things were going wrong
But the voting fiasco which saw the rejection of an estimated 140,000 ballot papers badly marred the outcome of the polls, which eventually saw the SNP emerge as the largest party in the Scottish Parliament.
The Holyrood and Scottish council elections saw the introduction of a new design of ballot paper for the parliament vote and a new voting system for the council seats.
The first SNP gain of the night came when it took Dundee West from Labour with 913 rejected ballots, which nobody thought too much of it at that stage.
But concerns emerged in the early hours, especially in the Airdrie and Shotts constituency where the number of spoilt ballot papers stood at 1,536 - only 90 higher than Labour's majority.
SNP leader Alex Salmond used his victory in Gordon over the Liberal Democrats to attack the voting system, later saying that if the Nationalists won power, he would hold an independent, judicial inquiry into the problems.
Worse was to come.
By 0400 BST, the Strathkelvin and Bearsden count was suspended after further problems with vote counting, while issues with counts in Edinburgh and Aberdeen also emerged.
The technical difficulties intensified with the suspension of the count in Eastwood and delays in Livingston and Linlithgow, and Perth and Tayside North.
As the SNP continued to gain seats, the Scotland Office insisted shortly after 0700 BST that the e-counting system was "working well", assuring voters that results were accurate and final.
By 0900 BST on Friday, 4 May, the Electoral Commission said it would investigate, but not before Alan Campbell, the Aberdeenshire returning officer, said he and colleagues in other areas had recommended to Scottish ministers that the count process be started that morning, rather than the previous evening.
Amid the chaos, the thousands of people who contacted the BBC Scotland news website blamed the redesign for the problems, while others claimed those who had mistakenly spoiled their papers had just not read the instructions.
"If you spoiled your voting paper you only have yourself to blame," stated Maureen from Kilsyth.
'Mach five bourach'
Barry Evans from Kincardine wrote: "If people are so stupid they cannot follow simple instructions on how to vote - surely their views should not be valued anyway."
As feeling ran high, many also held the opposite view.
"All the smug, condescending people who seem to think that this was a competition they've won, proving their intelligence is above others, are missing the point," stated Peter from Fife.
"If the process was not clear to this many people then there is clearly a problem."
The night's events even prompted BBC Scotland's political editor Brian Taylor to brand it a "mach five bourach".