The legal fight between DraftKings and FanDuel and New York's attorney general goes on.
Early Friday, a judge ordered the companies to stop operating in New York state, handing a victory to Attorney General Eric Schneiderman.
But a few hours later, an appellate court granted the companies an emergency stay of the ruling -- meaning they can continue operating in New York while the legal fight continues.
Schneiderman is trying to permanently bar the companies from operating in New York. He says their daily fantasy sports games constitute illegal gaming.
The two sites had asked New York State Judge Manuel Mendez to block Schneiderman. They argued it would be unfair to shut down their businesses while their case plays out in court.
But Mendez said they cannot accept bets from New Yorkers until the case is concluded.
"The protection of the general public outweighs any potential loss of business," Mendez wrote in his decision. He pointed out that the sites can continue to operate in other states. FanDuel said earlier that it gets about 10% of its business from New York residents.
David Boies, attorney for DraftKings, said in a statement that his client is ready to continue its fight.
"We look forward to a full and fair hearing and are confident we will demonstrate clearly ... why we should be able to continue to offer our DFS games in New York permanently," Boies said in a statement.
FanDuel said it is confident the fantasy sports sites will eventually prevail in court, and that there is support in the New York state legislature to change the law to explicitly allow fantasy sports in the state. Four separate bills have been introduced to legalize and regulate the games.
Related: FanDuel says only 16 N.Y. players have lost $50,000 or more
Schneiderman said the Mendez ruling is "consistent with our view that DraftKings and FanDuel are operating illegal gambling operations in clear violation of New York law. I have said from the beginning that my job is to enforce the law, and that is what happened today."
Last month Schneiderman issued cease-and-desist letters to both sites. Both filed court actions objecting to Schneiderman's order, arguing that fantasy sports is a game of skill specifically allowed under the federal law that prohibits other forms of online gambling.
FanDuel had already stopped accepting New York bets because of the earlier developments in the case. But DraftKings continued to accept New York players, arguing it was allowed to do so until the judge took action on Schneiderman's motion. FanDuel did not have an immediate comment on the ruling.
The decision is not a final word on whether daily fantasy sports constitute illegal gambling under the state's laws and constitution. But in his decision, the judge says that Schneiderman has a better chance of winning than the fantasy sites do.
FanDuel's statement said there are many issues that weren't considered by the judge when he made this ruling, and that the court will look at them as the case progresses.
"This is only the beginning of the legal process," FanDuel said.
Related: Fantasy sports players protest New York state ban
--CNNMoney's Ahiza Garcia contributed to this report.