Daily fantasy sports betting is illegal gambling under Illinois law, Attorney General Lisa Madigan said Wednesday.

Madigan's opinion, sought by two Democratic legislators, said that the debate over whether the popular contests involve skill or luck is irrelevant. Illinois outlaws both.

The law "clearly declares that all games of chance or skill, when played for money, are illegal gambling in Illinois," Madigan, a Democrat, wrote.

Madigan's decree follows decisions in New York and Nevada to ban the online sites for the same reason. Democratic Rep. Mike Zalewski of Riverside, who is pushing legislation to legalize and regulate the contests, said that while he disagrees that the pastime involves gambling, the ruling provides "more clarity."

Zalewski said in a statement that he's aiming for regulations "to allow Illinoisans to continue to play these contests and provide the necessary strong consumer protections for safe, fun play."

His proposal would require players to be 18 and allow sites to review players for child support or tax debts.

A major industry player, FanDuel, released a statement Wednesday night lamenting what it said was Madigan's ban on fantasy sports betting. "Chicago may be the best sports town in the country," said the statement, which called on lawmakers to "give back to the people of Illinois the games they love." The statement didn't say the site will cease operations in the state. A spokesman had no further comment.

David Boies, counsel to Boston-based DraftKings, another large operator, said in a statement that the company intends to "seek a judicial resolution" of the matter.

"As it does so, it will continue to abide by all relevant laws and will follow the direction of the courts," Boies said. "Pending that resolution the company will preserve the status quo."

Daily fantasy sports differ from the traditional model in that contests are organized around short periods — a week, or a day — instead of a season. Players compete for a predetermined prize by assembling virtual teams of real pro or college athletes; winners are determined based on the statistics those athletes compile.

Madigan pointed out that while state law allows prizes or compensation for "actual contestants," that doesn't include fantasy gamblers.

"Persons whose wagers depend upon how particular, selected athletes perform in actual sporting events stand in no different stead than persons who wager on the outcome of any sporting event in which they are not participants," Madigan wrote.

Nevada regulators declared the bets illegal gambling and ordered the sites out of the state unless they acquire gambling licenses; New York's attorney general ordered DraftKings and FanDuel to stop operating, but the companies won a temporary reprieve allowing them to continue through January. Madigan's opinion made no such orders.

Democratic Reps. Scott Drury of Highwood and Elgie Sims of Chicago sought the opinion. Drury said not only did taxpayers need to know whether the contests were legal, lawmakers needed to know what they are attempting to regulate.

"To me, it didn't make sense to consider legislation when we didn't know what the current status of daily fantasy sports is in Illinois," Drury said. "Now that we know, according to the attorney general, that it's illegal, we can make a serious attempt to address the issue."

Drury is not a fan of Zalewski's proposal, saying the minimum age of 18 is too young and that rules are too loose on winners who owe child support or tax money. Zalewski said he aligned parameters with current gambling regulations on riverboat casinos and horse racing.

"I disagree with those sentiments, but we have whole spring ahead of us to work on a bill that addresses concerns like that," Zalewski said.