A Canadian man has been told he has no chance of claiming on a C$27 million winning lottery ticket - because the machine printing it out was too slow.
Joel Ifergan went to buy two Loto-Quebec lottery tickets in Quebec, Canada, in 2008, and was told by the assistant that he had to be quick as the 9pm deadline was close.
He picked his numbers, and the machine started printing; but a little more slowly than usual. And, when the tickets emerged, the second one showed that it was for the following week's draw.
The assistant asked Mr Ifergan whether he still wanted the tickets, and he said that he did.
But when the draw was made, Mr Ifergan was horrified to discover that the numbers on his second ticket had come up. It turned out there was one other winner of the jackpot, meaning that if the ticket had been printed just a few seconds before, he would have had to share the winnings.
'It was on time'
He insists that both sets of numbers were in the system in time.
"The contract was crystallised at 8:59 pm," he says. "How they process their thing, that's their problem, not me, and I end up being penalised."
Ever since, Mr Ifergan has been fighting the lottery company through the courts, losing his case in Quebec Superior Court in 2012 and in the Quebec Court of Appeal in 2014. And, now, finally, he's been told by the Supreme Court that he can't appeal any further. He's spent an estimated C$100,000 on the case.
It's often hard for people to cope with narrowly missing out on a big win, and Mr Ifergan certainly isn't the first person to go to extreme lengths to try and get what they believe is rightfully theirs.
Last summer, for example, two New York men launched a case against the New Jersey Lottery after throwing out a Powerball ticket that turned out to be worth $1 million. They claim that when they checked the lottery website shortly after the draw it was still showing the previous week's results - and that when they saw the numbers didn't match, they chucked the ticket away.
Perhaps the saddest case is that of Martyn Tott, who threw a winning ticket away six months before seeing an appeal for the winner to come forward. Desoite being able to prove that he'd bought the ticket he said he had, Camelot refused to pay out.
Mr Tott fought the decision for years, launching three legal battles, and says the stress cost him his marriage.