One of the world's top poker players, Phil Ivey, has lost a Supreme Court bid to reclaim £7.7m of winnings withheld by a London casino for five years.
The American was challenging a Court of Appeal judgement that Crockfords Club could refuse to pay up when Ivey won the cash playing card game punto banco.
The club said Mr Ivey had broken its rules by using an "edge-sorting" technique to spot advantageous cards.
Mr Ivey had consistently argued that he had merely used a legitimate advantage.
The 40-year-old, a former winner of the World Series of Poker, had arranged to play a private game of punto banco - a form of baccarat - at the casino in Mayfair, along with a fellow gambler, Cheung Yin Sun, during a visit to London in 2012.
Crockford's owner, Genting Casinos UK, said the two players jointly used the technique of "edge-sorting", which involves identifying minute differences in the patterns on the back of playing cards and exploiting that information to increase the chances of winning. Genting said this was not a legitimate strategy.
However, Mr Ivey contended that the technique was not a form of cheating because it did not involve dishonesty.
He said that he had merely exploited Crockfords' failure to take proper steps to protect itself against a gambler of his ability - and he was therefore entitled to his full winnings, rather than just having his initial £1m stake returned to him.
The five Supreme Court justices unanimously upheld the Court of Appeal's decision on the case, with Lord Hughes saying it was essential that punto banco remained a game of pure chance with neither the casino nor the player being able to beat the randomness of the cards that were dealt.
He said: "What Mr Ivey did was to stage a carefully planned and executed sting."
Speaking outside court, president and chief operating officer of Genting UK Paul Willcock said: "This has been a landmark case in how the courts approach cheating in the modern day.
"This entirely vindicates Genting's decision not to pay Mr Ivey, a decision that was not taken lightly."
Who is Phil Ivey?
Mr Ivey is a 40-year-old world champion poker player who was born in Riverside, California, but now lives in Las Vegas.
According to the Hendon Mob poker ranking website, he is the sixth biggest earner of all time from tournament play - but he is known to have earned many more millions from private cash games.
He once played heads-up poker (a one-on-one version of the game) against Texan billionaire Andy Beal for three straight days and walked away $16m richer as a result.
During his divorce hearing in 2011 it was revealed in news reports that he received almost £700,000 a month from his stake in a poker company.
What is punto banco?
Punto banco is a form of the card game baccarat.
It is not unlike blackjack but the aim is to have cards that add up to nine, or as close as you can get.
It has a complex set of rules: when the total value of the cards goes into double figures, the first digit of the total does not count - so two sixes add up to two rather than 12. And there are further set instructions on what further cards must be drawn, unlike in blackjack where the player has the option.
Compared to other card games, it is not that widely played in casinos but is a popular choice with some high-stake gamblers.
A form of baccarat called "chemin de fer" was played by James Bond in the casino scene of the 1962 film Dr No.
What does this mean for Phil Ivey?
Analysis by John Hand, BBC News
For those who don't know their cards, it is hard to overstate how big a superstar Phil Ivey is in the poker world.
Dubbed the "Tiger Woods of poker", he has raked in tens of millions of pounds from a game that he mastered as a teenager - and coined in many more millions from sponsorship and by exploiting his carefully-built personal image. His mass appeal is such that he became the face of a Chrysler cars ad campaign.
For nearly two decades, Ivey has perfectly played the part of a cool, calm, calculating card-player with steely nerves and ice in his blood. Casinos fly him around the world as his presence can attract thousands of other punters.
But will Ivey be as big a draw after going "all-in" against the British legal system and losing? It is helpful for him that the case was not about poker - and that some of the gamblers he competes with will empathise with his explanation that he was merely being the best punter he could be, in using his savvy to try to beat a casino.
It was noticeable that this year Ivey skipped the main event in the World Series of Poker - the equivalent of Roger Federer taking a fortnight off during Wimbledon - and also mothballed his slick Ivey League poker school website.
Whether that marks the start of a general wind-down with more days to spend his millions and fewer days spent "grinding" for 12 hours at a poker table remains to be seen.