GettyImages-492972826
The fantasy sports website DraftKings is shown on Oct. 16, 2015 in Chicago. New York Attorney General Eric Schneiderman won an injunction against DraftKings and FanDuel, which he argued amount to illegal games of chance. Scott Olson/Getty Images

A New York judge on Friday ruled that daily fantasy sports companies FanDuel and DraftKings must cease operating in the state for now, 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.

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

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

Draftkings Inc. | FindTheCompany

But FanDuel and DraftKings, the privately-held leaders of the fantasy sports industry which both boast billion-dollar valuations, may have painted targets on their own backs with aggressive advertising at the start of the National Football League season that promised large winnings.

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