A software glitch in an optical-scan voting system added nearly 5,000 ballots to the tally of a South Dakota election this week. The error was discovered only after the election results were called, according to the Rapid City Journal.

The problem occurred when officials combined tallies from optical-scan machines in three precincts in Rapid City in Pennington County. The tabulation software used to combine the totals added 4,875 phantom ballots to the count. The system indicated 10,488 ballots were cast when, in reality, only 5,613 ballots existed, indicating that the glitch wasn't simply a matter of doubling the votes.

Oddly, no one caught the problem during the initial count. City election officials hadn't bothered to keep a manual tally of the number of ballots cast as voters handed them in and they were scanned into the machines – a procedure designed to catch exactly such a discrepancy. It was only after someone began to question the high voter turnout for the small election, that officials went back to count the ballots.

"By the time we discovered it and realized the right totals, everyone was at home and in bed," the county auditor said.

The incumbent in a city council race who appeared to win the race went to bed believing he'd received just 49.96 percent of the vote, which was more than his opponents received but short of the 50 percent plus 1 vote he needed to avoid a runoff election. A recount found that he actually received 51.8 percent of the votes.

Pennington County uses Auto-Mark machines and tabulation software from Election Systems and Software. The machines are a hybrid touch-screen and optical scan system. Voters place a full-size paper ballot into the machine, which is displayed on a touch-screen machine. They make their choices on the touch-screen, and the machine prints their selections to the ballot and returns it. The ballot is scanned and tabulated in another machine.

No one in the county election office was available to speak about the issue when Threat Level called.