Bad news for Manhattanites who use Airbnb to rent out their apartments temporarily: New York City officials have ruled that the service violates an "illegal hotel" law.

New York state law dictates that residents can't rent out all or part of a property for fewer than 30 days. Airbnb has argued that the law is meant to crack down on landlords who buy residential buildings and run hotels out of them, not on individual tenants.

City officials don't agree. A judge who heard a New York City Department of Buildings complaint has fined the landlord of an Airbnb user $2,400, after Nigel Warren rented out part of his East Village condo for three nights in September.

Warren's case has been in the news, including The New York Times, as a cautionary tale of what can happen to Airbnb users when they run afoul of the law -- or when the law is unclear, as Airbnb claims.

Back in September, Warren returned from a three-night trip to find his landlord had received five violation notices from the city as a result of the Airbnb rental. The case bounced back and forth. First, the violations were dismissed after the city's buildings department failed to file the correct paperwork. Then Warren was told to pay $7,000, including fees related to zoning codes. Later, those zoning violations were thrown out.

Further complicating things: Warren's roommate was home while his Airbnb renters were there. The law seems to provide an exception for such cases under certain conditions.

But after a hearing on May 9, Administrative Law Judge Clive Morrick ruled that Warren (who is wrongly called "Nick" in the court documents) did violate the hotel law, and that the exception is meant for houseguests, not "complete strangers who have no ... relationship with the permanent occupants."

See the ruling: NYC vs Airbnb

Airbnb, which filed a motion to intervene during the court proceedings, released a statement on Tuesday saying the company plans to keep fighting. A spokesman declined to comment specifically on whether Airbnb will pull its New York City listings.

"This decision runs contrary to the stated intention and the plain text of New York law, so obviously we are disappointed and we are considering all appeal options as we move forward," Airbnb said, calling the decision "wrong on the law, and bad for New York."

Airbnb called on the city to amend its laws and allow residents to conduct short-term rentals. The company also complained that "confusing and often contradictory laws" make it difficult for both hosts and Airbnb itself to understand the rules.

For its part, Airbnb warns users in its terms of service that they're the ones on the hook if they fall into legal trouble. If more cases like Warren's pop up, though, Airbnb users may become gun-shy -- and that would be a big problem for the company's future.