SAN FRANCISCO (AP) _ Computerized “sweepstakes” games offered at special Internet cafes are the equivalent of slot machines that are illegal under state law, the California Supreme Court ruled Thursday.

The court said the sweepstakes are games of chance because customers have no way to influence the unpredictable outcome.

“When the user, by some means (here swiping a card or entering a number), causes the machine to operate, and then plays a game to learn the outcome, which is governed by chance, the user is playing a slot machine,” Associate Justice Ming Chin wrote for the court.

The state last year explicitly banned such sweepstakes games. Authorities had been trying to crack down on the businesses that ran them, equating them to gambling dens that contributed to vices such as drugs and prostitution.

The sweepstakes are played through video games for cash prizes at the businesses where people pay to access the Internet.

Operators say the sweepstakes are different from slot machines because the computers don’t randomly determine winners. The results are determined in advance much like a lottery scratcher card, and the computers spit them out in sequence from a prearranged stack of entries.

The California Supreme Court rejected that argument in its unanimous decision in a case involving several Internet businesses in Kern County that prosecutors sought to stop from offering sweepstakes games.

The American Gaming Association estimates that Internet sweepstakes cafes take in $10 billion a year nationwide.

John Weston, an attorney for two of the business owners in the case, said his clients stopped running sweepstakes games in 2012 after a trial court issued an injunction.

He said the key issue for his clients was whether they could be fined for their behavior before the injunction, but the court did not address that.

The businesses’ owners say the games are a way to promote their other products and a fun way for customers to reveal a sweepstakes result.

Customers get points, or credits, for purchases they make at the store that they can use to play the sweepstakes.

The business owners claim sweepstakes operated by McDonald’s Corp., Coca-Cola Co. and other retailers, and the state’s lottery vending machines for Scratchers tickets would be illegal under the court’s analysis.

The state Supreme Court said lottery vending machines were different because they don’t have the element of chance.

“A customer can watch the next ticket fall from its holder, a straightforward proposition imbued with no particular suspense; the appearance of chance comes into play only once the lottery ticket is in hand,” Chin wrote.

The sweepstakes games, in contrast, are “attempts to recreate the sensation of playing with a device that itself generates the chance element,” he wrote.