The state Senate passed legislation to regulate and tax online fantasy sports sites in New York Friday night.

And that conflicts with State Attorney General Eric Schneiderman's attempt to ban two of the biggest daily fantasy sports companies — Fanduel and DraftKings — from taking bets in New York since last year.

He accused the contests of relying on chance and said they were illegal under state law.

Both DraftKings and FanDuel denied this, saying their wagers require skill.

But, the companies cannot resume operating unless the bill is signed by Governor Cuomo. Schneiderman says in a statement, despite the new legislation:

"We will nevertheless continue to pursue our claims that DraftKings and FanDuel previously engaged in false advertising and consumer fraud," the statement from the Attorney General reads.

DraftKings says it is pleased New York legislators welcomed the industry back to the state. We’ve reached out to FanDuel, and are waiting for comment.