Airbnb Inc. will need to share the names and addresses of hosts in New York City with officials thanks to a new law, the latest setback for the home-rental company in one of the world’s largest tourism destinations.

The law, which passed 45-to-0 in a city council vote Wednesday, is designed to help enforce existing rules banning short-term rentals. Mayor Bill de Blasio has said he supports the bill. Earlier in the day an Airbnb host backed financially by the company filed a lawsuit against New York City, accusing officials of retaliating against him for speaking out in support of home rentals.

Chris Lehane, head of global policy at Airbnb, said the policy will subject innocent hosts to over-policing and violates their privacy. Lehane, a former adviser to President Bill Clinton, lashed out at the council in a conference call with reporters and accused the bill’s supporters of putting the interests of hotel owners and unions above regular New Yorkers. “This is a bill that really is designed to benefit the hotel industry,” he said.

The debate over Airbnb’s role in New York has raged for years, with housing advocates saying short-term rentals contribute to rising rents and gentrification, while the company argues it helps homeowners afford their mortgages. Regulation hasn’t stopped the rise of the San Francisco-based company, which is valued at about US$31 billion and has faced resistance from local governments practically since it started a decade ago.

“This is about preserving as much affordable housing and housing stock as possible,” said Carlina Rivera, the councilwoman who introduced the bill. Before she was a politician, Rivera worked as a housing advocate and helped tenants who had been pushed out of their apartments by rising rents. “I would hear stories all the time of landlords that were hoarding apartments, that were running illegal hotels,” she said.

Council speaker Corey Johnson has led criticism of Airbnb for years, framing it as a way for property managers to escape taxes and safety regulations. New York City has been tightening rules on sites like Airbnb under de Blasio, including strengthening a ban on rentals lasting less than 30 days.

Despite Lehane’s protests, Airbnb played down the effect that the New York law would have on its business. “Most of our revenue is really coming from a much, much larger group of cities,” Lehane said. “This is not going to have an impact on us from a broader business perspective.”

With assistance from Henry Goldman