Airbnb filed a lawsuit against New York City on Friday, after Gov. Andrew Cuomo (D) approved legislation that would penalize individuals who advertise renting out their apartments for less than 30 days.

Technically, leasing an entire apartment for such a short period of time has been illegal in New York since 2010. But tenants do it anyway, and landlords often are unaware, look the other way or can’t stop the practice.

The new legislation will allow regulators to crack down on such activities by imposing fines of up to $7,500. Under the law, advertising includes any form of communication, so a listing on a home-sharing site like Airbnb could now result in a hefty fine.

Airbnb’s suit claims the new law “would impose significant immediate burdens and irreparable harm on Airbnb.” The company is arguing that the law violates its constitutional right to free speech and protection under the Communications Decency Act, which prevents websites from being held responsible for content published by its users.

Josh Meltzer, Airbnb’s head of New York public policy, criticized the legislation in a statement.

“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,” he said. “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.”

New York City has grown to become Airbnb’s largest market in the U.S., with the city’s hosts generating about $1 billion in revenue last year, according to The New York Times.