A Betfred punter denied a £1.7m jackpot over an alleged software glitch has won a legal battle to claim the winnings.
Andy Green, from Lincolnshire, scooped the prize in January 2018 while playing a blackjack game on his phone.
The bookmaker refused to pay out, claiming the error meant the game was not operating properly.
High Court judge Mrs Justice Foster ruled in Mr Green's favour and said the company had no grounds for withholding payment.
The judgement means Mr Green, from Washingborough, will finally receive his payout, plus interest, after a three-year battle.
In a statement, he said the lengthy row over the payout had made him wish he'd never won.
"Along with my family, I have been through some very low times and become very down," he said.
"My physical health has also suffered badly, and I sometimes wished I'd never won this money, because it was just making my life a misery.
"But today, I feel like the world has been lifted off my shoulders and I feel so incredibly happy and relieved - for me, my family and my legal team.
"The champagne can finally come off ice and be savoured."
Betfred apologised for the delay in Mr Green receiving his money and said it would not appeal against the ruling.
Speaking in 2018, he said he had gone "absolutely crazy" after scooping the jackpot on the Frankie Dettori Magic Seven Blackjack game.
Following the win, he extended his overdraft and spent more than £2,500 celebrating with family and friends.
In her ruling, Mrs Justice Foster said when he later contacted Betfred they "did not seek at this point to suggest other than that he was a big winner".
But a few days later, a Betfred director called him to say there had been a "software error" and it was rejecting the claim.
Mr Green said he felt like he had been kicked and had his "insides ripped out" after receiving the call.
After he challenged the decision, the company at one stage offered him £60,000 as a token of "goodwill" on the grounds he agreed not to talk about it ever again, but he refused.
In April 2019 he took his case to the High Court aiming to sue Betfred and its parent company, Gibraltar-based Petfre, for £2m, to include the interest he would have earned from the win.
Betfred had argued that the software glitch, which stopped the game from resetting properly while Mr Green was playing, was covered under the terms and conditions of the game.
However, Mrs Justice Foster ruled that the wording of the clauses relied upon was "inadequate", and "not transparent or fair and Betfred were not entitled to rely upon them".
A Betfred spokesperson said: "Mr Green won the jackpot three times whilst playing a game provided by one of our third-party suppliers.
"The supplier reported a software problem to us and advised that we should withhold payment.
"However, we will abide by the court's decision and not appeal. We would like to apologise to Mr Green for the delay in receiving his money."
Mr Green's lawyer Peter Coyle said he was "thrilled" for his client, adding that the judgement would "give hope to others who may be thinking that the big, rich guys always win".