NEW YORK — The world of daily fantasy sports was roiled Friday by a pair of court decisions: The first ordered DraftKings and FanDuel to stop operating in the state, the second said to play on.

Early Friday, New York Supreme Court Justice Manuel J. Mendez’s sided with New York Attorney General Eric Schneiderman, who has called the sites illegal gambling operations. The sites were banned from operating in New York, sparking outrage from fans and angst that the industry could face similar actions across the country.

But a few hours later, an appeals court issued an emergency stay, allowing the sites to continue to operate — at least temporarily.

It was a big win for DraftKings and FanDuel which were facing expulsion in one of their most popular markets. But the battle between the companies and New York Schneiderman is far from over.

“The day has ended well and now New Yorkers who love daily fantasy sports can continue to play,” said Randy Mastro, DraftKings’ attorney. “The takeaway from today is these are legal questions that deserve a full airing. We believe that when we have our full day in court, we will prevail.”

The court action in New York is being closely watched as an indication of the challenges DraftKings and FanDuel may face in other states as they set out to persuade lawmakers that daily fantasy sports is unlike gambling because it is a game of skill, not a contest of chance.

“We look forward to demonstrating to the appellate division why they should uphold today’s decision to grant a preliminary injunction barring DraftKings and FanDuel from continuing their illegal gambling operations in New York,” Damien LaVera, spokesman for Schneiderman, said in a statement.

In daily fantasy, players build an imaginary team with real-life athletes, accumulating points based on their athletes’ game-day performances. But instead of lasting the length of a traditional football or basketball season, daily fantasy players can pick new teams every day.

The payouts for winners can reach millions of dollars.

For years, the industry has operated in a vacuum left by Congress. The 2006 Unlawful Internet Gambling Enforcement Act banned online gambling, including online poker, but carved out protection for fantasy sports then largely relegated to season-long workplace leagues.

The New York attorney general began investigating daily fantasy sports earlier this year amid allegations that employees of the competing companies were using inside information to win games. That sparked an investigation that now includes Yahoo, which also has a daily fantasy sports site.

DraftKings and FanDuel are also facing pressure in other parts of the country. The Massachusetts attorney general’s launched an investigation of the industry earlier this year and has proposed new rules that would prohibit people under 18 from playing and require professional players, known as “sharks,” to identify themselves.

“This is a lot of money, it is now a billion dollar industry. . .it cries out for some degree of regulation,” said Minnesota state Rep. Joe Atkins, a Democrat, who is pushing legislation to regulate the industry in his state. “Right now it is the wild west out there.”

Without regulations, the sites are likely to be banned altogether, he said. “As the law reads in Minnesota and in many other parts of the country, [daily fantasy sports] would be captured in our gaming statue” and deemed illegal, said Atkins.