By ASSOCIATED PRESS

A Kentucky appeals court ruled Friday that an online poker company does not have to pay the state $870 million plus interest, a blow to the state’s novel effort to recover the illegal gambling losses of more than 34,000 of its citizens.

A three-judge panel of the Kentucky Court of Appeals concluded the state is not allowed to sue the company that owns PokerStars.com because Kentucky is not a “person” under a state law that allows for people to sue and recover the illegal gambling losses of others.

“It is perhaps the most significant appellate decision in Kentucky in recent times to set aside a judgment of that magnitude,” said Sheryl Snyder, an attorney who represented The Stars Group, which owns the website PokerStars.com.

The Kentucky Justice and Public Safety Cabinet filed the lawsuit in 2010. Cabinet spokesman Mike Wynn said officials are disappointed in the ruling and plan to appeal to the state Supreme Court “as soon as possible.”

It’s illegal to play online poker for money in Kentucky. But from 2006 to 2011, the state said about 34,000 Kentucky residents lost more than $290 million wagered on PokerStars’ website. The company has since blocked Kentucky residents from using the site.

A state law says people who lose $5 or more in illegal wagers have six months to file a lawsuit to recover the money. If they don’t, the law says “any other person” can sue to recover the money. Plus, the court can force the winner to pay up to three times the amount lost.

The law is designed to deter people from skirting the state’s gambling ban. In 2010, Kentucky sued to recover those losses on the PokerStars site, arguing the residents who lost the money never sued to get it back.

In 2015, Franklin Circuit Judge Thomas Wingate agreed and ordered the company to pay back the $290 million. Wingate then tripled that amount to punish the company for what he said was making “a calculation that breaking the law was good for business.”

The three-judge panel reversed that decision on Friday. Judge Allison Jones wrote that requiring the company to pay the large judgment “would certainly deter similar Internet gaming/betting services.” But she said allowing the judgment to stand would “completely contravene” the other purpose of the law: To allow people who lost money in illegal bets “to avoid becoming destitute as a result of a gambling problem.”

“The Commonwealth is not bringing this action to collect the money and then return losses to the ‘losers.’ It is bringing this action to collect treble damages for its own benefit,” Jones wrote.

Including the 12 percent interest, state officials said the judgment against PokerStars would be worth more than $1 billion for the state treasury. That’s more than Kentucky spends in state tax dollars each year on the Justice and Public Safety Cabinet, which includes prisons, the Kentucky State Police, the Department of Juvenile Justice and public defenders.

Kentucky has not received any of that money. Snyder said the company posted a $100 million bond with the Franklin Circuit Court to prevent the state from collecting the judgment while the case was on appeal. Snyder said if the appeals court ruling stands, the company will get that money back.