Gov. Andrew Cuomo signed into law Friday a bill that penalizes users of services like Airbnb for advertising short-term apartment rentals in New York City, which already are illegal under state law.

Airbnb immediately said it would file a lawsuit.

“This is an issue that was given careful, deliberate consideration, but ultimately these activities are already expressly prohibited by law,” Cuomo spokesman Rich Azzopardi said 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.”

The new law is a blow to the international home-sharing website, which earlier this week sought to convince Cuomo to veto the legislation by putting forth a set of proposals it wanted lawmakers to take up when reconsidering how to regulate the type of service it provides.

“In typical fashion, Albany back-room dealing rewarded a special interest — the price-gouging hotel industry — and ignored the voices of tens of thousands of New Yorkers,” Airbnb spokesman Peter Schottenfels said in a statement. “A majority of New Yorkers have embraced home sharing, and we will continue to fight for a smart policy solution that works for the the people, not the powerful. We are filing a lawsuit in New York this afternoon.”

The company believes the bill violates the Federal Communications Decency Act, the First and Fourth amendments of the U.S. Constitution and the home rule clause of the state Constitution.

Cuomo’s signature underscores a concern from companies that operate within the “sharing economy” that New York remains unreceptive to newer technologies that threaten some within certain industries, such as the hospitality and taxi industries.

As state lawmakers have taken action on Airbnb, it’s notable inaction on ride-hailing that has kept companies like Uber and Lyft from operating upstate, much to the chagrin of a number of legislators. Legislation that would have cleared the way for such companies to operate outside of New York City died after unreconcilable differences between Assembly and Senate legislation emerged late in session.

Yet while some companies spin a narrative that state lawmakers are not tech friendly, those with concerns about how some companies in different parts of the sharing economy operate say their legislation is for the betterment of New Yorkers.

“We know Airbnb wants to talk about tech innovation, home-sharing models, but our focus is protecting hard-working families and affordable housing here in this city,” Assemblywoman Linda Rosenthal, who sponsored the Airbnb bill, said Wednesday. “We’re struggling with an affordable housing crisis, and Airbnb and other sites like it are responsible for the loss of thousands of units of housing here.”

State Sen. Liz Krueger, D-Manhattan, said in a statement that Friday “is a great day for tenants, seniors, and anyone who values the safe and quiet enjoyment of their homes and neighborhoods.”

“For too long companies like Airbnb have encouraged illegal activity that takes housing off the market and makes our affordability crisis worse,” she said. “They have sat idly by while unwitting ‘hosts’ are evicted for breaking their leases, unscrupulous landlords drive out tenants to profit off the short-term market, and tourists are put in danger by staying in unregulated, unaccountable, and often dangerous illegal hotels.”

Krueger noted that the legislation does not prohibit those who use sites like Airbnb from renting out a spare room while they are in their homes.