ALBANY, N.Y. - Daily fantasy sports companies can continue to do business in New York state after a state court late Friday reversed a ruling that could have shut them down.

Friday morning, Supreme Court Justice Manuel Mendez issued an injunction, sought by Attorney General Eric T. Schneiderman, suspending the operations of DraftKings and FanDuel - the two largest daily fantasy sports companies.

Schneiderman, a Democrat, has filed a civil lawsuit to shut down the companies, calling them illegal gambling operations.

But late Friday afternoon, the Appellate Division of the Supreme Court granted an immediate stay of the injunction.

"This immediate stay was granted, so we will remain fully operational in New York," a DraftKings spokesman said in an email.

FanDuel, which had shuttered New York operations amid the legal fight, did not immediately comment about the stay.

A Schneiderman aide said that the stay was for one month and that the attorney general would seek to quash it.

"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," Schneiderman spokesman Damien LaVera said in an email.

New York-based FanDuel and Boston-based DraftKings control about 95 percent of the daily fantasy sports market, officials have said. The companies claim they offer games of skill, not chance, and that they therefore are legal.

In granting the injunction decision, Mendez warned that "a preliminary injunction does not constitute a determination of the ultimate issues."

But a New York law professor said Mendez's ruling indicates that FanDuel and DraftKings are in big trouble in this case.

"There is a chance FanDuel can still succeed, but that chance is substantially less than it was before," Nellie Drew, a sports law professor at the University at Buffalo, said in an email. "The injunction doesn't mean it is over for FanDuel, but it certainly bodes very well for the attorney general. I would say, more likely than not, that unless there is something in FanDuel's and DraftKings' arsenal that we have yet to see, they have a big worry."

The companies had argued that shutting them down before the lawsuit was resolved would devastate their businesses. Mendez said that had to be balanced with other concerns.