The city of Toronto has the green light to go ahead with new rules limiting Airbnb and short-term rentals. On Monday, a provincial tribunal finally ruled on the matter after two years in limbo, siding with Toronto and rejecting an appeal by a group of landlords.

Toronto’s rules were initially approved by city council in December 2017. Under the plan, short-term rentals are only allowed in a landlord’s principal residence for no more than 180 nights a year. Homeowners can rent a maximum of three bedrooms all year long for no more than 28 days at a time. Landlords aren’t allowed to list secondary suites or basement apartments as short-term rentals at all—only the tenants who live there can rent them for 28 days or less. A spokesperson with the city said that details on implementing these rules will be available in December.

This decision dragged on for so long that in January of this year, Toronto took the unprecedented step of asking Airbnb to abide by the rules voluntarily. Airbnb declined. The San Francisco-based company—worth an estimated US$38 billion—is the biggest short-term rental operator in the city. Last month, a VICE investigation uncovered a U.S.-wide scam on Airbnb and raised questions about its verification and refund process. The multinational corporation said it would verify all seven million listings and make changes to the way it operates as a result.

The Local Planning Appeal Tribunal (LPAT), which is the provincial body that approved Toronto’s regulations, stated that this move could return 5,000 of the estimated 21,000 Airbnb units to the market. That number represents about 25 percent of Airbnb units in Toronto, but doesn’t include listings on other platforms such as Kijiji and VRBO. The rental vacancy rate in Toronto is around one percent, which is historically low—meaning that for every 1,000 rental units in the city, only ten are available.

In a written statement to VICE, Alex Dagg, Airbnb Canada’s public policy manager, said “while this ruling provides regulatory certainty for home sharing in Toronto, we continue to share our hosts’ concerns that these rules unfairly punish some responsible short-term rental hosts who are contributing to the local economy.”

Toronto mayor John Tory issued a statement that the city’s plan aims to “strike a balance between letting people earn some extra income through Airbnb and [other rental sites], but we also wanted to ensure that this did not have the effect of withdrawing potential units from the rental market.” People who occasionally rent out their home, or parts of it, won’t notice much of a difference.

The new rules require landlords to register their rentals with the city and pay $50. Rental platforms such as Airbnb and VRBO have to pay a one-time licence application fee of $5,000 as well as $1 for every night booked. Landlords will have to pay an accommodation tax of four percent on short-term rentals (less than 28 consecutive days).

Thorben Wieditz runs Fairbnb—which represents tenant advocates, academics and the hotel industry—and describes the ruling as Airbnb suffering an “immense defeat.” Toronto’s regulations are similar to rules already in place that limit short-term rentals in Vancouver.

Although Wieditz says there are ways around the rules, they take aim at people who use Airbnb to run what is essentially a hotel business, with multiple properties available year-round—places that could be homes for people who live and work in Toronto, one of the most expensive places to own a home or rent in the country.

“Commercial hosts are real estate investors who commodify our residential housing stock. They operate anywhere from two to many dozens of so-called entire homes, be these houses, apartments or condo units. They use residential housing stock as hotel inventory in buildings that were not planned, zoned, approved and built as hotels, but as residential buildings,” Wieditz said.

The group of landlords who opposed the rules have 30 days to file an appeal or request a review of the decision. It’s not yet clear if they will.