Since late 2015, San Francisco Mayor Ed Lee and some city lawmakers struggled to push through a new law that grants extra floors and extra units to developers in exchange for more affordable housing.

The Affordable Housing Bonus Program—now called “Home SF” for short—finally passed at the Board of Supervisors on Tuesday on a 10-1 vote.

Supervisor Norman Yee was the only dissenter, after failing to exempt a few extra blocks in his district from the new rules.

The part of the law offering bonuses to affordable housing developers passed last year, but the more contentious, market-rate relevant half lingered in limbo for months.

This is the same law that once so infuriated some San Franciscans that former Supervisor David Campos led an angry crowd to the steps of City Hall in January of last year to decry it.

Housing activist Calvin Welch went so far as to declare, “This is ethnic cleansing.” Welch worried that more development and greater density would incite gentrification.

By contrast, Tuesday was a mostly cheerful affair, with lawmakers congratulating each other after more than a year and a half of negotiation. “Home SF to create 5,000 units of affordable housing over 20 years,” Sunset rep Katy Tang declared on Twitter.

Tang emerged as the law’s biggest supporter, even though relatively little of the new development will occur in her district.

The latest version of the law provides:

Up to two additional floors and other zoning incentives to a project sponsor who provides 30 percent of its units as affordable units. [...] It applies to projects of three units or more and only in certain enumerated zoning districts on parcels that do not contain residential uses.

Affordable units may be priced at between 90 and 140 percent of the city’s median income for condos and between 55 and 110 percent for apartments.

The condo prices are on the high side because the city touts the law as a tool to prod developers into creating middle class housing. The bonuses only apply to certain lots on certain streets adjacent to major transit lines.