A Scottish-based fantasy sports firm and its main rival have argued in a New York court that the contests are legal games of skill rather than illegal gambling as they fight to avoid a potentially crippling shutdown in one of their top markets.

New York Attorney General Eric Schneiderman has filed for a preliminary injunction to shut down FanDuel – which was started by Lesley Eccles, her husband Nigel and three others in Edinburgh in 2009 - and DraftKings

Mr Scheiderman said the fantasy sports gaming groups are moving forward with plans to start operating outside its core market of the US and are "is nothing more than a rebranding of sports betting."

New York Supreme Court Justice Manuel Mendez, after hearing oral arguments on the high-stakes matter said he would rule "very soon."

The hearing came amid continued scrutiny of the online daily fantasy sports industry, with authorities at the state and federal level scrutinizing whether the games amount to gambling.

DraftKings and FanDuel, the industry leaders, are private companies with high-profile investors and valuations of more than a billion dollars.

Assistant Attorney General Kathleen McGee argued that factors outside of contestants' control, like player performance or calls on the field, made clear daily fantasy sports materially involved chance, making them illegal forms of gambling.

"Chance pervades fantasy sports," she said.

But David Boies, DraftKing's lawyer, noted Schneiderman's office had taken the stance that seasonal fantasy sports were legal unlike the daily version.

The daily contests were no more reliant on chance than their seasonal counterparts, as both are dependent on how players perform on the field, Boies said. He also contended the seasonal version had even more chance involved, since contestants are limited to players they can pick in a draft, as opposed to anyone.

"They cannot have it both ways," he said.

FanDuel had already stopped taking new deposits from New Yorkers two weeks ago and blocked them from playing in the contests last week. DraftKings has continued taking money in the state.

Modern 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.

The companies may have painted targets on their 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.