BOSTON (AP) — Boston has agreed to a settlement with the short-term rental firm Airbnb aimed at trying to protect affordable housing in the city.

Mayor Marty Walsh said under the deal announced Thursday, Boston will have the power to notify the San Francisco-based company of listings deemed ineligible under the city's short-term rental ordinance. Unless the host complies with the registration process in thirty days, Airbnb will be required to remove the listing from its platform.

Boston will continue requiring owners to register their units, and regulating which units are eligible to be used as short-term rentals. By December 1, all listings will be required to display a city-formatted registration number, or the listings will be removed. As part of the agreement, Airbnb will inform users of the city's short-term rental standards, and work to ensure their listings are registered.

Walsh said one of his top priorities is to create and preserve affordable housing for all Boston residents.

"My goal in regulating short-term rentals has always been to responsibly incorporate the growth of the home-share industry into our work to create affordable housing for all by striking a fair balance between preserving housing and allowing Bostonians to benefit from this new industry," Walsh said in a press release.

Walsh said the city's short-term rental regulations are designed to let Boston's home-sharing industry grow, while preventing operators from monopolizing Boston's housing market with short-term rentals — adding to the city's sky-rocketing housing costs. The regulations bar non-owner occupants from running short-term rentals in leased units.

An Airbnb representative said the company's goal was to find a path forward for home sharing in Boston.

"With this settlement agreement, that is what we have collectively achieved, establishing an effective regulatory framework for compliance" Airbnb spokeswoman Liz DeBold Fusco said in a statement. "We are proud that we have forged this comprehensive solution with the city and look forward to working with our community to make them aware of their role within this new framework."

Under the agreement, Airbnb will also share data with the city, including the listing's unique URL, registration number, host ID, listing information, and listing zip code.

City regulations prohibit any property with outstanding housing, sanitary, building, fire or zoning code violations from being listed. The operator is also required to provide notice to abutters of a short-term rental unit within 30 days of approved registration.

Short term rental operators must register with the city each year and pay an annual license fee.

The city has pointed to a 2016 study by the University of Massachusetts-Boston that found a slight increase in rental prices due to increases in Airbnb listings as one reason for the short-term rental regulations.