All bets are off in New York state for two highly lucrative fantasy sports companies.

State Attorney General Eric Schneiderman sent cease-and-desist letters on Tuesday to DraftKings and FanDuel, ordering them to stop accepting wagers in the state because, he said, they violate New York laws against illegal gambling.

In the letters, Schneiderman contends that the fantasy sports sites, which lure players with the promise of millions of dollars in prizes, are essentially based on luck — and because they are a type of gambling, they are illegal in the state.

Related: States, Feds and Fans Turn Up the Heat on DraftKings and FanDuel

"Like most gambling operations, DraftKings'/FanDuel's own numbers reveal a far different reality," according to the letters obtained by NBC News. "In practice, (daily fantasy sports) is far closer to poker in this respect: a small number of professional gamblers profit at the expense of casual players."

The companies are able to challenge the attorney general's order in court.

Boston-based DraftKings said it was "disappointed" with Schneiderman's "hasty action" and defended its online offerings as a game of skill.

"We strongly disagree with the reasoning in his opinion and will examine and vigorously pursue all legal options available to ensure our over half a million customers in New York State can continue to play the fantasy sports games they love," a DraftKings spokesperson said.

Related: The Fantasy Sports Industry by the Numbers

The company tweeted out a petition Tuesday afternoon telling fans to stand up against state officials.

FanDuel, based in New York, also tweeted a similar petition for players to respond to officials: "To anyone looking to end this game I say: Let us play!" (NBC News' parent company, Comcast Corp., and NBC Sports are among the investors in FanDuel.)

RT & Protect your right to play fantasy sports. Sign the petition below. #FantasyForAll https://t.co/ml49VVt9CC pic.twitter.com/QmECsybs55 — FanDuel (@FanDuel) November 10, 2015

"This is a politician telling hundreds of thousands of New Yorkers they are not allowed to play a game they love and share with friends, family, co-workers and players across the country," FanDuel said in a statement. "The game has been played — legally — in New York for years and years, but after the attorney general realized he could now get himself some press coverage, he decided a game that has been around for a long, long time is suddenly now not legal."

The New York order threatens to put the popular billion-dollar-plus fantasy sports giants in limbo. The entire industry has been mired in scandal after The New York Times revealed last month that employees may have access to insider data.

One DraftKings staffer, Ethan Haskell, had inadvertently released data from the company's "Millionaire Maker" contest that showed he had information not given to the public — providing him with a tactical edge. He reportedly won $350,000 playing on rival site FanDuel.

Schneiderman said Tuesday that "daily fantasy sports is neither victimless nor harmless, and it is clear that DraftKings and FanDuel are the leaders of a massive, multibillion-dollar scheme intended to evade the law and fleece sports fans across the country."

"Today we have sent a clear message: not in New York, and not on my watch," he said.

Five states — Arizona, Iowa, Louisiana, Montana and Washington — ban daily fantasy sports sites, and Nevada recently ordered such companies to shut down and get a gambling license if they want to resume operations.