TORONTO -- The City of Toronto is enforcing new regulations to ensure that people can only rent out their primary residence as a short-term rental in an effort to deal with “illegal ghost hotels” and help free up some of the city’s housing.

The new rules come into effect Thursday amid concerns that apartments, condos and homes used as short-term rental and investment properties are hurting the city’s long-term rental stock.

“We have been advocating for this since 2016 and our efforts have prevailed,” said Thorben Wieditz, a spokesperson with housing advocacy group FairBnb Canada.

“If even half of the currently illegal 6,500 entire home listings were returned to the long-term rental housing market, the city’s vacancy rate would increase from 1.3 per cent to 2 per cent, providing sorely needed relief to home-seekers.”

Short-term rental operators will now need to register their primary residence with the city’s new online registration system in order to operate in Toronto.

Once registered, operators will be issued a number, which must be included in all advertisements and listings on short-term rentals sites like Airbnb.

The new regulations come after years of court battles between the city and residents, who objected to the rules saying that it put limits on how people can rent out their properties.

“This is good news for Toronto residents and a step in the right direction when it comes to regulating short-term rentals and maintaining the peace and quiet of our neighbourhoods,” Toronto Mayor John Tory said in a statement.

“This system will provide crucial oversight of operators and ensure that they are held accountable and only operate within their principal residences.”

The new registration rule will apply to anyone planning to rent out their entire primary residence in which they live or up to three rooms in that residence.

Residents can rent up to three bedrooms in their home for an unlimited number of nights per year or they can rent out the entire home for a maximum of 180 nights per year.

“People who are currently renting their home on a short-term basis, or planning to do so, must be registered by December 31, 2020,” the city said in a statement. “After this date, all new operators will be able to register on an ongoing basis and must register prior to short-term renting their homes.”

Any short-term rental operator who fails to register with the city could face a fine of $1,000. There may also face an additional $1,000 fine for advertising an unregistered shot-term rental.

“We will keep a close eye on the level of compliance and, if need be, help the city, condo boards and residential communities to turn illegal ghost hotels into long-term housing supply,” Wieditz said.

Nathan Rotman, a spokesperson with Airbnb, told CTV News Toronto that operators will need a registration number in order to place their property on the site.

“Airbnb has been working collaboratively with the City of Toronto on the registration effort for many months,” Rotman said.

“Airbnb has worked with local governments around the world and operates successfully in jurisdictions with all kinds of short-term rental regulations.”