New York State’s highest court dealt a blow to Facebook and other social media companies seeking to expand privacy protections on Tuesday, ruling that Facebook had no right to appeal bulk search warrants ordering the company to hand over information from hundreds of accounts in a disability fraud case.

The state Court of Appeals, in a 5 to 1 decision, with one judge recusing himself, upheld lower court rulings that New York law does not allow a social media company to challenge a judge’s decision to issue search warrants in a criminal case on behalf of its clients.

The ruling was a setback for civil libertarians and social media companies hoping the court might create a different rule for search warrants aimed at seizing all the information in electronic accounts, treating them more like subpoenas, which can be challenged as overly broad before they are executed.

But Judge Leslie E. Stein, writing for the majority, said state courts had held for decades that search warrants issued by judges cannot be appealed to a higher court. Instead, they may only be challenged by a defendant during a pretrial hearing as illegal searches.

“Indeed to hold otherwise would be to impermissibly and judicially create a right to appeal in a criminal matter that has not been authorized by our legislature,” Judge Stein wrote in her 25-page decision.

She acknowledged Facebook had presented the court with “novel and important substantive issues regarding the constitutional rights of privacy and freedom from unreasonable search and seizure” but said the court was “constrained by law” to reject the company’s arguments.

One judge dissented. Judge Rowan D. Wilson argued that the federal law authorizing the warrants — the Stored Communications Act of 1986 — did not distinguish between warrants and subpoenas. In his reading, that statute gives service providers a right to appeal all overly broad court orders, including search warrants.

“State rules of procedures applicable to garden-variety warrants cannot be used as a device to contravene or frustrate federal law,” he wrote.

Judge Wilson noted that the framers of the New York State Constitution in 1938 had specifically warned against the evil of the invasion of privacy in electronic communications. “The New York Constitution commands us to guard vigilantly against that evil,” he said.

The case — known formally as “In Re 381 Search Warrants Directed to Facebook Inc.” — had been closely watched as a test, as Facebook sought to expand its ability to fight what it sees as fishing expeditions by prosecutors. Several tech giants, including Google, LinkedIn and Twitter, filed amicus briefs, as had the New York Civil Liberties Union.

The search warrants were signed in 2013 by Justice Melissa C. Jackson on the strength of a 96-page affidavit that has never been made public.

Facebook moved to quash the warrants, saying they were too broad and objecting to the judge’s order prohibiting the company from telling its clients about them. Judge Jackson denied the motion, saying Facebook, as a service provider, could not argue the searches were unconstitutional on behalf of its clients. She also said there was enough evidence of fraud to justify the mass warrants.

The warrants ordered Facebook to turn over all of the information in the accounts of 381 people, including private photos and conversations.

That information was used by the Manhattan district attorney, Cyrus R. Vance Jr., to obtain indictments for disability fraud against more than 130 police officers and other former public employees. None of the people indicted challenged the search warrants.

Mr. Vance personally argued the case before the court, underscoring its importance to his office, which has used private information in Facebook accounts not only to prove the enormous disability fraud scheme, but to make conspiracy cases against hundreds of members of street gangs in housing projects.

One of the concurring judges, Jenny Rivera, wrote a separate opinion, saying she agreed with the majority but on the narrower grounds that Facebook had not made the right arguments under the federal law for quashing the warrants: that they were would cause and undue burden and harm its business. Still, Judge Rivera said she agreed with Judge Wilson that the federal law permitted Facebook to appeal a judge’s decision on search warrants to a higher court.

Jay Nancarrow, a spokesman for Facebook, said the company had yet to decide whether to take its case to the federal courts.

“We’re disappointed by the court’s ruling,” he said. “But we are encouraged to see the thorough dissent that supports Facebook’s position arguing for people’s online privacy. We are grateful to the many organizations that joined us in challenging these overbroad warrants.”