In a landmark decision by the Local Planning Appeal Tribunal (LPAT),  Airbnb landlords who argued that short-term rentals were just like any other residential use of a home lost out to a vote in favour of regulatory policies.

Toronto’s rental market has been plagued by supposed “ghost hotels” aka Airbnb-run properties that eat into the housing supply.

The LPAT decided in favour of the city’s short-term rental rules which allow landlords to rent out solely their principal residences for up to 180 nights a year.

READ: Airbnb Banning ‘Party House’ Rentals After Major Holiday Shootings

An adjudicator for the LPAT said that city’s regulation of Airbnb’s business “represented a reasonable balancing…ensuring that housing is provided for residents, that a full range of housing is available including short-term rentals, and that the business and tourism economies are supported.”

Homeowners are permitted to rent up to three bedrooms year round on a short-term basis – a term defined as less than 28 days.

Tribunal member Scott Tousaw explained that each short-term rental within the city district displaces a permanent household.

The impact of this on the affordable housing crisis is huge.

In fact, the Globe and Mail estimated this past June that Airbnb removed up to 31,000 homes from Canada’s rental market.

READ: Airbnb Is Only Making Toronto’s Tough Rental Market Worse: Report

Tousaw also said that homeowners wouldn’t be allowed to use basement apartments as short-term rentals.

The LPAT said the tribunal’s decision would return up to 5,000 of Toronto’s more than 21,000 Airbnbs to the long-term rental market. Those are properties that owners aren’t currently residing in – in other words – investment properties.

“Even if you return only 3,000, it’s a huge win for renters in Toronto,” says Thorben Wieditz of Fairbnb, a tenant advocate group.

Mayor John Tory praised the LPAT for enforcing the balance between allowing investors to reap a profit but also ensuring that the city’s stock of rental apartments wasn’t depleted by tourists.

In a statement, Tory explained: “These changes do not prohibit short-term rentals but permits and regulates them in a manner that does not displace households. They also provide opportunities to meet the needs of residents and visitors requiring or preferring short-term rental accommodation in a residential setting.”

The new rules will likely be enforced at the start of 2020.

No word yet on whether Airbnb landlords will appeal the Appeals court for a second shot.