The New York State Appellate Court struck a blow to fans of online fantasy sports Thursday by upholding a lower court's ruling that a 2016 law permitting daily fantasy sports contests violate state law.

In 2016, the state Legislature passed a law that allowed for "interactive fantasy sports" contests. Then-state attorney general Eric Schneiderman and several other plaintiffs appealed the law on grounds that it allowed gambling in violation of the New York Constitution, thus kicking off years of debate over the exact definition of gambling.

Fantasy sports websites DraftKings and FanDuel had cited case law to argue that their method of charging users entry fees didn't constitute "bets" or "wagers," and argued that the federal Unlawful Internet Gambling Enforcement Act of 2006 (UIGEA) made exceptions for their fantasy business.

Appellate Court Justice Robert Mulvey wrote in the majority opinion that "the Legislature clearly intended that (these) contests be heavily regulated," and also struck down the provision that stipulated daily fantasy contests were not considered to be gambling.

Requests for comment to DraftKings and FanDuel were not immediately answered Thursday.