It was Christmas Day in South Carolina and plenty of people were feeling lucky. For just $1, they could buy a ticket for Holiday Cash Add-A-Play at their local convenience store. The ticket looked a bit like a tic-tac-toe game: get three Christmas trees in a row on a nine-space grid and you won, maybe $2 or 20 bucks. Get all nine Christmas trees to fill the grid entirely and you won the $500 jackpot. The odds of that happening were 1 in 4,800.

But something amazing started happening at exactly 5:51 p.m. on Christmas: Practically everyone, it seemed, was winning the big jackpot.

Word got around quickly.

People flocked to lottery outlets dotting street corners and interstates all across South Carolina, as though it was the night before a hurricane. The lottery machines started running out of tickets, one gas station attendant told WYFF. The cash registers started running out of money.

In just two hours, lucky South Carolinians had purchased about 71,000 tickets, racking up more than $35 million in prize money. A Christmas miracle.

“I was calling everyone I knew,” one of the winners, Nicole Coggins, told WYFF. “I won $500!”

She played again. “And it was another winner and another winner. So I thought, ‘Well maybe there is something wrong with the machine. This can’t be real.’ ”

It wasn’t real. There was, in fact, something wrong.

As the happy prize winners were soon to discover, it was a glitch. The local news liked to call it the glitch that stole Christmas.

On Wednesday, the South Carolina Education Lottery announced that, because the glitch caused scores of erroneous winning Holiday Cash Add-A-Play tickets, the thousands of people who won $500 that day would not be getting their money.

The statement explained:

Coding errors by SCEL’s former computer gaming vendor, and the vendor’s inadequate quality assurance testing that would have discovered these errors prior to deployment of this game. These actions caused approximately 71,000 plays (wagers) to be erroneously produced, issued and printed with nine (9) Tree symbols, which were incorrectly recognized as a $500 winning play. Regrettably, these errors by the former vendor led loyal players to mistakenly believe that they held winning tickets.

The Post and Courier reported that retailers paid out at least $1.7 million to people who cashed in immediately, before the glitch was caught. SCEL said its vendor that provided the computer software, Intralot, suspended the game about 7:53 p.m. once it realized what was happening.

So when winners started filing up to the counter to claim their prizes, the cashiers read back to them the message that popped up on their screens: “transaction not allowed.” The tickets were invalid.

South Carolina law does not allow the state to pay lottery winners prize money if their tickets were produced in error, the SCEL statement says.

According to the Post and Courier, the state lottery commission is seeking to force Intralot (which is no longer the vendor) to reimburse the state for the $1.7 million in paid-out tickets.

The unlucky ones who couldn’t cash in immediately will get a grand total of $1, a refund of the ticket price.

Coggins has filed a class-action lawsuit against the South Carolina Lottery Commission and Intralot, claiming that refusing to pay the prize money that she lawfully won is a breach of contract. In other words, the glitch wasn’t the players’ problem. It is one of two lawsuits pending in state courts over this glitch.

Coggins told WYFF she planned to use the $18,000 she thought she won that day to take the kids to Disneyland, among other things. Berry Pickens told The State that he and his wife planned to use the $10,000 they won to prepare for their fourth child on the way and save up for the kids’ college funds. And Bridget Castrillon said she was banking on that money to pay the bills that month.

But the attorney for South Carolina Lottery Commission has urged players to look at this situation another way: They were never real winners to begin with.

“When they look back at the game specifications and they realize that that document in their hand should have never come out of that machine,” Tim Madden told Fox 57 in Columbia, “then they will say, ‘those things happen,’ and the lottery did what they were supposed to do.”

More from Morning Mix: