Gov. Andrew Cuomo signed legislation on Friday designed to crack down on the online advertising of multi-family dwellings in New York City — a measure seen aimed at limiting the popular online rental service Airbnb.

The bill’s approval is a win for affordable housing advocates who have decried the impact Airbnb has had in New York City. It is also a win for the Hotel Trades Council, a small but politically influential labor union that has backed efforts to regulate Airbnb.

And the legislation was backed by the Real Estate Board of New York, a monied and influential coalition of property owners in New York City.

“This legislation is an important step toward stopping illegal behavior that takes precious housing units off the market, threatens hotel workers’ jobs and hurts the quality of life for residents in our City’s multifamily buildings,” said John Banks, III, President of the Real Estate Board of New York. “We would like to thank the Governor as well as the members of the State Senate and Assembly for addressing this critical issue.”

Airbnb, meanwhile, has signaled on Friday afternoon it will file a lawsuit to challenge the measure.

“This is an issue that was given careful, deliberate consideration, but ultimately these activities are already expressly prohibited by law,” said Cuomo spokesman Rich Azzopardi in a statement.

“They also compromise efforts to maintain and promote affordable housing by allowing those units to be used as unregulated hotels, and deny communities significant revenue from uncollected taxes, the cost of which is ultimately borne by local taxpayers.”

Those who violate the law could face fines of up to $7,500.

The bill’s approval comes as Airbnb is planning to step up its campaign efforts in New York through a super PAC independent expenditure committee that has started running an ad blasting Republican Sen. Sue Serino’s vote for the measure.

At the same time, the company this week released a proposal that would regulate its operations to include an online registry of renters and further reforms to its business.