TALLAHASSEE, Fla. (AP) – A skeptical federal judge Wednesday criticized the agency under Florida Gov. Rick Scott that oversees gambling and signaled he’s going to rule the Seminole Tribe of Florida can keep blackjack tables at its casinos.

A three-day trial that could shape the future of gambling in the state ended Wednesday. But during a back-and-forth in closing arguments, U.S. District Judge Robert Hinkle suggested state regulators had violated an existing deal with the tribe.

If Hinkle rules against the state, that could jeopardize tens of millions of dollars it now receives from the Seminole Tribe, which operates the Hard Rock casinos in Tampa and Hollywood. The Seminoles and the state reached an agreement in 2010 that allowed the tribe to offer blackjack at most of its Florida casinos but that provision expired last year. The state has received nearly $1.7 billion under that arrangement.

Attorneys for the tribe maintained during the trial that regulators who work for the Scott administration allowed dog and horse tracks to offer card games and an electronic blackjack game that mimicked the tribe’s casino games. They said that under the initial deal, the tribe would be allowed to keep blackjack for another 15 years if the state allowed someone else to have the same type of gambling.

But attorneys hired by the state disagreed with that assertion and suggested that the tribe was trying to find a way to keep blackjack tables that it is no longer entitled to keep. Top regulators for the state testified that they began to crack down on illegal card operations once they became aware of it.

But after hearing testimony from both sides, Hinkle said it appeared to him that Florida regulators had allowed an “end run” around a state law that prohibits the dog and horse tracks from offering certain kinds of card games. He said that it appeared that the state did not address the problem until the tribe raised it in its lawsuit.

Ken Lawson, the secretary of the Department of Business and Professional Regulation, was in the courtroom but refused to answer any questions about the judge’s criticism or about the testimony of his employees. He said it would be “inappropriate” to answer questions and told reporters to email his press office.

If the tribe wins the lawsuit, it could lead to a new round of negotiations over gambling with the state. The tribe could also stop making payments to the state. Jim Allen, CEO of Seminole Gaming, said such a decision would be made by tribal leaders. But he also pointed out that the tribe wants to maintain a good relationship with the state.