A New York judge on Friday ruled that the leading daily fantasy sports companies FanDuel and DraftKings must cease operating in the state, in what could be a crippling blow to the fast-growing, multibillion-dollar industry. New York Supreme Court Justice Manuel Mendez granted an injunction sought by Attorney General Eric Schneiderman after hearing arguments last month over whether daily fantasy sports games amounted to illegal games of chance or lawful ones involving skill.

The injunction is not the final determination on the ultimate issues of the case, which will be heard in a trial. But a shutdown in the state -- one of their largest markets -- could be devastating to the companies.

Both FanDuel and DraftKings -- the two market leaders in daily fantasy sports -- said they plan to appeal the ruling.

"New Yorkers have been able to legally play our games for more than six years, and today's preliminary decision was wrong and we expect we will ultimately be successful," FanDuel said in a statement.

But while Mendez stopped short of deciding whether daily fantasy sports are a game of skill or chance under New York law, he ruled that there was a likelihood of the New York attorney general winning his case if it ever went to trial.

Schneiderman last month sent cease and desist letters to the companies demanding that they stop taking money from players in the state.

FanDuel stopped letting New York state residents play the games after receiving the letter, but DraftKings continued operating as usual.

Since FanDuel stopped taking money from New Yorkers, entry fees in the company's most popular weekly NFL games have dropped by about 25 percent, according to data from fantasy sports analytics company Superlobby. Over that same period, DraftKings' entries are down around 12 percent.

Nationwide scrutiny

The ruling comes amid nationwide scrutiny at the state and federal level as to whether the games amount to gambling. The decision has the potential to ripple throughout the country as eight other states have gambling laws similar to New York's, according to DraftKings.

Fantasy sports started in 1980 and surged in popularity online. Participants typically create teams that span an entire season in professional sports, including American football, baseball, basketball and hockey.

Daily fantasy sports, a turbocharged version of the season-long game, have developed over the past decade. Players draft teams in games played in just one evening or over a weekend.

This has enabled fans to spend money on the games with a frequency that critics say is akin to sports betting.

The companies have raised hundreds of millions of dollars from investors including Fox Sports, Major League Baseball, the National Hockey League, KKR & Co LP, Raine Group, Google Capital and the venture arms of Time Warner Inc and Comcast Corp.

DraftKings also partnered with Major League Baseball to advertise in ballparks while FanDuel signed partnerships with several NFL teams.

Darren Heitner, an attorney specializing in sports law, said that aside from the lost revenue from New Yorkers, the ruling was also a major public relations blow for the companies.

"This will be talked about," Heitner said. "It's going to potentially scare some venture capitalists and even these leagues that have an equity interest" in the companies.

Privately-held FanDuel and DraftKings may have painted targets on their own backs with aggressive advertising at the start of the National Football League season that promised large winnings.

Bernstein research estimates that 59 percent of total TV ad revenue growth in the third quarter alone was from spending on daily fantasy football ads.

FanDuel has said it planned to pay out $2 billion in cash prizes this year.

The companies could still be saved in New York's state legislature where a number of bills of have been introduced to make the games legal. But the level of support for these bills is unclear and lawyers said the state's attorney general could challenge any such laws as being unconstitutional.