CORRECTION: The original story noted that the repeal would end simulcasting of horse racing. It would actually only end simulcasting of greyhound racing, and would leave all laws relating to horse racing as they are.

The Massachusetts Supreme Judicial Court heard oral arguments Monday on whether an initiative petition repealing the state’s casino gaming law should be allowed to go on the ballot, with several justices saying they were puzzled by the attorney general’s rationale for disqualifying the measure and others questioning whether voters can take away gaming licenses without compensating the owners.

Related: Coakley sides with pro- and anti-casino forces on petition Peter Sacks, a top aide to Attorney General Martha Coakley, came in for the toughest questioning. Coakley ruled in September that the initiative petition repealing the casino gaming law did not legally qualify for the ballot, prompting its supporters to take her to court. Sacks said the attorney general believes the state cannot invite casino operators to apply for gaming licenses and then cancel the application process before it is completed without compensating the applicants. The proposed ballot question doesn’t include any compensation because, by law, initiative petitions cannot appropriate state funds.

What seemed to puzzle many of the justices was the attorney general’s theory that casino applicants acquire a property right that cannot be taken away without compensation during the application process for a license, but lose that property right if they are actually awarded a license. The theory is further complicated by the fact that the state’s slots parlor license has already been awarded and two of the three casino licenses could be issued by the time voters go to the polls in November.

“I’m still confused,” confessed Justice Margot Botsford, who noted the whole point of the application process was to acquire a license.

Tom Bean, the attorney representing anti-casino forces, insisted neither the application process for a license nor the awarding of a license creates a contractual right for the casino operator. He also said the state can never contract away its power to police activities such as gambling.

But Justice Robert Cordy seemed skeptical. He questioned Bean’s contention that the state could invite businesses to spend millions of dollars competing for gaming licenses and then change course and take away the licenses without offering any compensation. When Bean affirmed that was the case, Cordy said: “Wow.” Cordy also indicated he felt a 15-year casino license was a contract of sorts that couldn’t be revoked through the exercise of the state’s police powers. “Police powers are limited,” he said. “Police powers don’t trump the Constitution.” Related: Gaming Commission grants 7-day reprieve on host community decisions

Chief Justice Roderick Ireland asked Bean whether he thought allowing the petition to appear on the November ballot would have a chilling effect on the state’s business climate by suggesting the rules in Massachusetts are always subject to change. Bean did not respond directly to the question, but said he thought that argument would be used by pro-casino forces in fighting the petition if it makes it on to the ballot.

Several justices also seemed to take issue with Carl Valvo, the attorney for pro-casino forces, who argued that the state could not revoke a casino license without compensating the holder. Justice Ralph Gants seemed skeptical that the Legislature or voters would be barred from reversing course on gaming if it turned out to be a flop, failing to produce good jobs and spur economic development. Valvo responded that the state could change its mind about gaming, but only if it compensates the licensees.

Coakley, a Democratic candidate for governor, has taken heat in some quarters for ruling that voters shouldn’t be given a chance to weigh in on casino gambling in November. Sacks said the attorney general’s legal argument for denying the petition was originally put forth by the casino industry, but his remarks showed how the attorney general is at odds with casino proponents on every other legal issue. For example, casino proponents say voters can’t take away a gaming license without compensating the holder. The attorney general disagrees. Casino proponents also say the proposed ballot question should be disqualified because it asks voters to approve two separate policies: abolishing casinos/slots parlors while also eliminating simulcast betting on horse greyhound races held around the country. The attorney general disagrees, saying casinos and simulcast betting are part of the same general policy.

Coakley is basically arguing that if the justices don’t agree with her position about a contractual right arising during the application process, they should allow the question on the ballot in November. The initiative petition, if it makes it on to the ballot, is likely to be the dominant political issue this fall, with pro-casino forces mounting a well-financed campaign to defeat the measure. The issue is already a key issue in the race for attorney general and is likely to become a hot issue in the race for governor.