A New York judge on Friday ruled that 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.

NY AG tells fantasy sports sites to stop taking bets

A lawyer for DraftKings said the company would immediately be filing for a stay of the decision and plans to appeal the ruling.