LONDON -- He's long been a winner at cards, but American poker star Phil Ivey's good fortune does not extend to Britain's Supreme Court -- he lost a major case Wednesday that will keep him from cashing in.

The British Supreme Court upheld a lower court ruling that Ivey had used illegitimate means to amass $10.2 million in winnings during a stint at the baccarat table in 2012.

He and a colleague were found to have used a technique known as "edge sorting" to gain an unfair advantage while gambling at the Crockfords casino in London's posh Mayfair district.

Get Breaking News Delivered to Your Inbox

They did not actually touch the cards being dealt, but convinced the croupier to arrange the cards a certain way that allowed them to determine, in some cases, which cards were being dealt, allowing them to bet accordingly.

Crockfords cried foul and refused to pay his winnings, leading Ivey to pursue his claim in court.

Supreme Court Judge Anthony Hughes said the integrity of Punto Banco baccarat depends on the cards being dealt at random without gamblers knowing their face value.

"What Mr. Ivey did was to stage a carefully planned and executed sting," he said.

He said Ivey took "positive steps to fix the deck" by tricking the croupier. He said that "is inevitably cheating."

Ivey, long recognized as one of the top players in international poker, said his winnings were honestly obtained.

"At the time I played at Crockfords, I believed that edge-sorting was a legitimate Advantage Play technique and I believe that more passionately than ever today," he said after the ruling.

He said he pursued the case to Britain's highest court out of a sense of honor.

"As a professional gambler, my integrity is everything to me," said Ivey, who has won a number of World Series of Poker competitions.

The president of Genting Casinos UK, which operates Crockfords, said the ruling "vindicates" the company's decision not to pay Ivey his baccarat winnings.

"We are delighted that the High Court, the Court of Appeal and now the Supreme Court have all found in Genting's favor, confirming that we acted fairly and properly at all times and that Mr. Ivey's conduct did indeed amount to cheating," he said.