VANCOUVER -- Despite the rats, roaches and clogged toilets at decaying rooming houses and hotels in Vancouver's Downtown Eastside, activists and experts say they provide necessary affordable housing to the poorest people who would otherwise be pushed onto the streets.

The Balmoral Hotel recently became the focus of the housing crisis in the neighbourhood when the city issued an evacuation notice for about 143 tenants after it determined the building is at risk of collapse.

Vancouver's bylaws define single room occupancy as hotels or rooming houses with non-market units of less than 320 square feet that typically come with shared bathrooms and don't have a full kitchen.

There are 156 buildings with a total of 7,199 units that meet the categorization and 43 per cent are privately owned and managed. The rest are either owned or managed by non-profits or the government.

Many of the buildings are more than 100 years old and were first established to house workers in forestry and mining, said Abi Bond, the city's director of housing policy and projects.

Over the decades, low-income residents in need of affordable housing increasingly moved into the buildings and the city enacted a bylaw to preserve the buildings for that purpose.

Housing activist Wendy Pedersen said some tenants in the Balmoral have lived there for decades and most residents have a disability, mental-health issues or addictions. They have built a community and look out for each other, she added.

Single occupancy accommodations exist in cities around the world, but Bond said Vancouver's system is unique and is typically compared with San Francisco.

Bond said the city has a policy to ultimately phase out the buildings in favour of social housing that has kitchens and bathrooms in each unit, but the process could take decades and requires funding from other levels of government.

In the meantime, the city is encouraging more government or non-profit partnerships and the purchase of single room occupancy buildings that are privately owned in an effort to see them upgraded and provide social services to the tenants.

"The city can't do all of this on our own," Bond said.

The age of the buildings and rents as low as $375 a month mean some have fallen into disrepair.

A fire at the Pandora Hotel in 2010 led the city to step up enforcement of regulations and inspections particularly at the 10 highest risk buildings, said Kaye Krishna, the city's general manager of development, buildings and licences.

Vancouver Mayor Gregor Robertson said in a news release issued Friday that the city is consulting its prosecutor about taking the owner of the Balmoral to court for the 150-plus violations related to the safety and security of the tenants.

Neither the owner of the hotel nor his lawyer could not be reached for comment.

The city has the power to conduct repairs and bill the owner if orders aren't followed, but Krishna said the city doesn't typically take that route, preferring instead to use the courts and other enforcement strategies to hold owners accountable.

"Overall, the city feels it's really incumbent on the private owners to do the work and not necessarily at the expense of taxpayer dollars," she said.

More recent inspections by engineers led the city to issue a warning to residents to evacuate the Balmoral by Monday because it is structurally unsound.

The city says in a news release that it has secured 131 housing units for the displaced tenants and is working to help the remaining renters.

Jean Swanson, a volunteer and organizer with the Carnegie Community Action Project, said the problem stems from a lack of affordable housing.

In 2016, the city found 1,847 people were homeless and of them, 539 were not using any type of shelter. A preliminary report for 2017 says the number of homeless people grew to over 2,100.

Swanson said gentrification in the Downtown Eastside, with the development of more condominiums and market rentals, has made more people homeless

"People feel like they're being pushed out of their own neighbourhood," she said.