Updated

A New York court is hearing arguments over the legality of the country's two biggest daily fantasy sports companies.

More than 100 lawyers, observers and reporters appeared Wednesday at the hearing in state Supreme Court in Manhattan.

New York Attorney General Eric Schneiderman has sought to stop Boston-based DraftKings and New York-based FanDuel from operating in the state.

Lawyers for the companies say the immensely popular contests are games of skill and permissible under the law.

Assistant Attorney General Kathleen McGee said the two companies were promoting illegal gambling. She said ultimately the games depend on the performance of professional players on the field — how many touchdowns are made, how many runs scored — and factors out of the contestant's control, such as injuries, rain delays and blown calls. Daily fantasy sports players essentially make their bets, set their lineups and then wait.

"Each of these events is out of the control of the bettors," she said.

She also argued that even if fantasy sports involve skill, that alone doesn't save them under state law. "If chance is a material element of these games it doesn't matter how much 'skill' is involved," she said.

John Kiernan, a lawyer for FanDuel, argued that his company's contests are immensely skill-based — and were indeed events outside and separate from what happens on the field. He likened daily fantasy sports players to general managers picking rosters of individual players, thus by skill increasing the possibility of success independent of whether a professional team wins or loses on the field.

Prompted by a question by the judge, he said the central argument in the case is whether FanDuel's customers are "mere observers or actual participants of a contest that is separate and apart."

Following afternoon arguments by a lawyer for DraftKings, each party is being given time for rebuttal. It was not clear whether the judge will issue a ruling on Wednesday.

The arguments follow weeks of legal wrangling after Schneiderman declared DraftKings and FanDuel illegal gambling operations, sent them cease-and-desist letters and demanded they shut down.

Since then, FanDuel has stopped New Yorkers from playing on its site. Both companies have complained that payment processors have been pressured to not facilitate hundreds of thousands of New York customers' payments.

Both companies have spent millions of dollars on advertisements, pitching the contests to casual sports fans as ways to win big simply by putting together competitive rosters.

They've drawn the attention of media companies, professional sports teams and other big investors. The companies offer games in most states, though regulators in Nevada and elsewhere have recently restricted their business.

The companies have said they're open to regulations and consumer protections, but argue legislatures should head that effort, not prosecutors.