NEW YORK (AP) — Airbnb has agreed to drop a lawsuit against New York City over a new state law it said could have deterred hosts and impaired its revenues.

The settlement was reached Friday.

READ MORE: Video: Woman Struck By Backhoe, Run Over In Brooklyn

The law levies hefty fines against those who offer to rent out their entire living space for less than 30 days.

Supporters say it’s necessary because some property owners take apartments that could be homes for city residents out of circulation.

READ MORE: 2 NYPD Officers Recovering, Suspect In Custody After Police-Involved Shooting In Brooklyn

Airbnb said the law rewarded the hotel industry at the expense of ordinary New Yorkers.

It says it’ll work with the city on how the law will be enforced.

MORE NEWS: Prince Harry And Meghan Markle Open Up About Royal Struggles In Bombshell Interview

Democratic Assemblywoman Linda Rosenthal who wrote the law calls the settlement “an astounding about-face” by Airbnb.