At Tuesday's Board of Supervisors meeting, the much discussed and fairly controversial Airbnb legitimacy law passed by a vote of 7 to 4, along with some new amendments. One amendment that failed to pass, however, which was part of a sweeping addition by Supervisor David Campos (who ultimately voted against) would have held Airbnb accountable for $25 million in back hotel taxes that not been collected on its rentals, but which will be collected going forward. Needless to say, Airbnb is happy that they are not on the hook for $25 million, as the Chron reports.

The crux of the new law, which faces a second perfunctory vote in two weeks before getting sign-off by the mayor, forces Airbnb hosts to be residents of the homes they rent for at least 275 days a year, and limits their rentals to 90 days a year. The intent of the law is to prevent the kind of egregious flipping of rental property into short-term rentals — something that was called out just this week by this list of the "Sleazy 16" landlords whom the Anti-Eviction Project says are the worst offenders in this regard. Also, Airbnb hosts will now have to join a city registry, and in some neighborhoods, neighbors will be notified when a unit gets put on this registry.

Supervisor David Chiu, who originally proposed the ordinance, issued a statement celebrating the vote and calling it "a balanced approach to the complex housing issues facing San Francisco." He adds, "We can protect our City's housing units from being converted to hotels, while also allowing short-term rentals on a limited basis to help residents afford to stay in their homes."

The law will continue to allow people like host Kepa Askenasy (profiled in this earlier Chron piece), who rents out four different suites in her home and basically makes a living off of being a hotelier, to continue doing business without restriction, because she remains present in the home. As Socketsite notes, a proposed amendment that would have limited such "hosted rentals" also to 90 days was rejected.

Housing advocates and eviction protesters alike have remained staunchly against the law arguing that tenants have been getting displaced in order to make room for tourists paying a premium. As the SF Bay Guardian reports, Supervisor John Avalos Eric Mar poked at the "cult-like" beliefs of the home-sharing brigade during yesterday's meeting, and he ultimately voted against the ordinance altogether.

Ignoring the fact that hundreds — if not more — units across the city have been emptied of regular tenants during this housing crunch in order to take advantage of lucrative vacation rental rates, Airbnb issued a statement praising the Board's vote saying it "will give regular people the right to share the home in which they live."

Campos, Avalos, Norman Yee, and Eric Mar were the four no votes. And while Supervisor Jane Kim remained a skeptic of the law, calling it potentially "unenforceable," she ended up voting with the majority after promising some "trailing legislation" of her own that will beef up enforcement of the law by allowing housing nonprofits to file fast-tracked lawsuits against offending landlords. The law already allows building owners to file such lawsuits.

So there you have it: San Francisco becomes the first city in the nation to formally legalize this informal, tourist-centric piece of the "sharing economy." But this should get pretty interesting when New Yorkers weigh in on the debate, as they've already started to.

All previous Airbnb coverage on SFist.