Airbnb, a site that lets people around the world find short-term housing accommodations, suffered a major setback this month when a judge ruled that one of its users broke an “illegal hotel” law in New York City.

The trouble began last September, when Nigel Warren rented out his bedroom in his East Village apartment on Airbnb for three days. Even though his roommate was home and there was no reported misbehavior, New York City’s special enforcement officers slapped fines of more than $40,000 on Warren’s landlord for violating illegal transient hotel rules, according to the New York Times. New York City law restricts residents from renting out apartments, or rooms in them, for fewer than 30 days, unless they are also living in the home during the guests’ stay.

On May 9, Judge Clive Morrick ruled in favor of the city, reasoning that since the Airbnb host had “complete strangers” residing in his apartment during the stay, Warren’s landlord was indeed operating an unlicensed hotel and has to pay a fine of $2,400. (Warren agreed to pay the fines on behalf of his landlord in order to avoid eviction.)

No stranger to similar controversies in other cities, Airbnb released a statement saying it will continue to fight the legal battle. While its terms of service say that users are fully liable for complying with local laws, the company maintains that New York City’s laws are not aimed at individual tenants, but instead at preventing landlords from buying residential buildings and operating them as hotels, reports CNN Money. The San Francisco-based company, which currently operates in over 33,000 cities in 192 countries, has raised the ire of authorities elsewhere — most recently in Amsterdam, where the main issue is that local laws, such as paying tourist taxes, are circumvented with Airbnb transactions.

Since New York City’s mayor’s office of special enforcement began carefully scrutinizing short-term rental issues in 2006, it has received more than 3,000 complaints, conducted nearly 2,000 inspections and issued nearly 6,000 notices of violation, according to the New York Times. In January, the travel news site Skift estimated that approximately half of Airbnb’s listings in New York City “are likely illegal.”

This is the second time in less than a week that the new wave of sharing services, which are all part of the burgeoning “collaborative consumption” movement, have come under fire in New York state. On May 16, the car-sharing service RelayRides suspended operations in New York City after state officials accused it of violating insurance laws and issued an alert warning consumers about the risks of car sharing without adequate insurance.