NEW YORK (CBSNewYork/AP) — A federal judge on Thursday blocked a new city law aimed at limiting Airbnb and other home sharing services that city officials have blamed for driving up rents by limiting the number of available residential units available across the five boroughs.

Last year a report paid for by the Hotel Trades Council, a union of hotel workers, was highly critical of Airbnb operating in New York City. Using researchers from McGill University in Montreal, they concluded the rental company was driving up rental prices and reducing housing availability in the city due to so-called “ghost units” not made available to local New Yorkers.

According a report by the city’s comptroller office last summer, New Yorkers are losing $616 million due to higher rents driven by Airbnb rentals.

The law passed last year was due to go into effect in February and required online home-sharing services to disclose to the city detailed information about tens of thousands of listings each month, along with the identities and addresses of the units’ hosts.

U.S. District Judge Paul A. Engelmayer made clear it wasn’t a close call whether the law violates the Fourth Amendment’s search and seizure provisions, though he only needed to find a more than 50 percent likelihood that the companies would win before suspending the law’s Feb. 2 enforcement.

The ruling comes in an early stage of litigation, prior to the collection of additional evidence by both sides, but decisions written with the flourish that Engelmayer provided generally remain consistent until the case ends.

Under the law, companies would be required to reveal the names of hosts, among other information.

“The scale of the production that the ordinance compels each booking service to make is breathtaking,” Engelmayer said of a law the city established last summer so it could crack down on illegal listings and impose fines. Companies would be required to reveal the names of hosts, among other detail.

He estimated that enforcement penalties could cost the companies hundreds of millions of dollars. If the law had been in effect in 2016, Airbnb would have had to produce user data regarding over 700,000 bookings, the judge noted.

Each company, he said, was expected to provide “what is effectively a wholesale replica of that booking service’s database as to New York City users.”

In the era prior to electronic data storage, such overreach would have been “unthinkable” because of the Fourth Amendment, the judge said.

He said if he let the law’s enforcement proceed unchecked, the result could be far reaching because it would invite municipalities to make similar demands on other e-commerce companies for broad-ranging records of all users and customers.

By the city’s logic, he said, the city could compel all online auction services to produce all sales records so investigators could find tax cheats or demand that all medical providers produce all patient records so law enforcement authorities could more easily locate health care fraud.

At a news conference, Mayor Bill de Blasio defended the law that requires companies to also reveal the addresses of hosts, and whether they’re renting a room or the full apartment. Critics say the listings boost rents for New Yorkers by diminishing the quantity of rentable properties.

“This is a law to stop landlords from creating de facto hotels, which is unfair and illegal, which creates real security problems for neighbors,” the mayor said. He added that there was a lot of legal process ahead, and the city believes it will ultimately prevail.

In a statement, San Francisco-based Airbnb Inc. praised the ruling, calling it “a huge win for Airbnb and its users, including the thousands of New Yorkers at risk of illegal surveillance who use Airbnb to help make ends meet.”

“The court today recognized the fundamental importance of New Yorkers’ constitutional rights to privacy and the sanctity of their own homes,” the statement said.

The report says from 7,000 to 13,5000 housing units have been removed from circulation over a 3-year span, and median rent in the city increased by $380 a year.

Other highlights from the study noted:

* Two-thirds of revenue came from likely illegal listings.

* About 4,700 private room listings comprise many rooms in a single apartment.

* Nearly 75 percent of the population in neighborhoods at highest risk of Airbnb-induced gentrification across New York are non-white.

READ: Judge’s Opinion On Law About Home Sharing

According to Bloomberg news, Airbnb Inc. disputed the study’s findings, calling them “wrong on the facts” and containing “substantive issues with the methodology.”

The company also said the data came from AirDNA, an analytics company separate from Airbnb, Inc.

AirDNA released a statement countering the conclusions made by the NYC comptroller’s office.

“The report, which incorrectly interpreted AirDNA data to make assumptions on the impact of Airbnb on New York City rental prices, comes to flawed conclusions at great cost to the thousands of Airbnb hosts that rely on the platform to make ends meet.

“At no point did the Comptroller contact AirDNA to ask for guidance or our professional expertise on how to read the data, leading to several crucial errors in his interpretation of the numbers.”

Previously, Airbnb hosts in New York City claimed the city was colluding with opposition groups to spy on their properties using “undercover renters” using the service.

New York State has some of the nation’s toughest restrictions on Airbnb. In 2017, Gov. Andrew Cuomo signed into law a measure authorizing fines of up to $1,000 for many short-term rentals. The measure applies to rentals of less than 30 days when the owner or tenant is not present.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)