Home-sharing platforms Airbnb and HomeAway have settled with the city of San Francisco over a lawsuit the companies filed, challenging the short-term rental law put in place two years ago. Under the agreement, the legal challenge has been dismissed and will result in the creation of a registration system for local hosts.

“We have successfully defended San Francisco’s common-sense regulations on short-term rental,” explained City Attorney Dennis Herrera in a statement. “This agreement helps protect the city’s precious housing supply by obligating these companies to ensure that all their listings are legal and properly registered.” He described the action as a “game changer.”

In 2015, the city passed a law that, while it continued to make short-term rentals legal, reduced the amount of time a room or home can be made available for rent each year. It also ordered Airbnb hosts to sign on to a city registry while also collecting taxes from the company and requiring hosts to maintain adequate insurance. In November, San Francisco’s Board of Supervisors ruled that homes could be listed for only 60 days each calendar year, further reducing opportunities for hosts to monetize their property.

Airbnb and HomeAway sued San Francisco last summer, arguing that the short-term rental law violates federal law, but was rebuffed by U.S. District Judge James Donato.

With the settlement, both home-sharing companies will implement a registry in San Francisco. At this point it doesn’t seem like it will affect others outside of the city limits. Airbnb claimed that the creation and rollout of this system will take about eight months and will roll out in phases. Information provided through this system will be directed to San Francisco’s Office for Short-Term Rentals “for consideration.” The City Attorney’s office said that it will simplify the process for hosts.

Every month, Airbnb and HomeAway will give the city a list of all San Francisco listings to help verify whether a unit is registered or not. Any listing deemed to have an invalid registration will have all future stays cancelled and be deactivated upon notice from the city.

“While we continue to work through the details of the registration process in the coming weeks, we will ensure you have the latest information. Please know that none of your private information will be shared with the City without your consent, however every host on our platform in San Francisco will have to register by the end of the implementation period in order to continue hosting,” Airbnb wrote in a statement.

There are currently 2,100 registered short-term rental hosts in San Francisco according to the city, but Airbnb reportedly has more than 8,000 listings in the area.

Airbnb and HomeAway have 120 days in which to require new hosts to be registered and 240 days to add existing hosts.

“This will be a powerful deterrent for those tempted to illegally convert the city’s housing stock into mini hotels,” Herrera said. “For those who have been turning badly needed rent-controlled units into vacation spots, that is coming to an end once and for all.”

Updated as of 2:05 p.m. Pacific on Monday: HomeAway’s director of policy communications Philip Minardi provided VentureBeat with this statement: “HomeAway is pleased to have reached an agreement with the city to create a more convenient means for owners to comply with local rules. We look forward to continue working with the city on reasonable regulations for vacation rentals that balance the needs of communities with our owners’ rights to rent their properties — and take into account the benefits that traditional vacation rentals have brought to the San Francisco area for decades.”