A judge has ruled that evidence shows “a substantial number” of Airbnb hosts are probably breaking the law in New York by renting out their homes through the website.

The decision appears to be a blow to Airbnb’s effort to prove they can operate legally in one of its most important U.S. markets. The company has been valued at $10 billion, and has received hundreds of millions in investments from venture capitalists.

The judge also denied a subpoena from New York Attorney General Eric Schneiderman's office seeking to compel Airbnb to hand over information about hosts.

Acting Supreme Court Justice Gerald W. Connolly said in an 11-page decision released Tuesday that the materials being sought by the AG’s office were overly broad and “irrelevant to the inquiry at hand.” 

Airbnb said in a statement that the decision by the judge was “good news for New Yorker who simply want to share their home and the city they love.”

Schneiderman's office said it had served Airbnb with a new subpoena on Wednesday addressing the issues the judge had raised. "The time has come for Airbnb to stop shielding hosts who may be violating a law that provides vital protections for building residents and tourists," said Schneiderman spokesman Matt Mittenthal in a statement. 

Schneiderman's office has been investigating whether some Airbnb hosts are running illegal hotels as well as flouting tax laws. As part of the investigation, Schneiderman’s office had sought names, addresses and other identifying information for each host renting accommodations in New York.

Policymakers have been critical of Airbnb and other websites that allow anyone to share their homes, saying that doing so not only violates state law but also raises quality of life issues.

State Sen. Liz Krueger, of Manhattan, has been working to limit Airbnb in New York. She said in a statement that the judge’s decision on Tuesday “gives Airbnb a little time.”

“I’m no lawyer, but this looks like the definition of a pyrrhic victory,” she continued.

While fighting in court, Airbnb has been working to change state law by lobbying in Albany.