The aftermath of the deadly fire at 22-24 Noyes St. last year has yielded a series of terrifying revelations.

The two-apartment building in which six people died had been operated as an unofficial rooming house, in violation of city ordinances. The building’s smoke detectors were disabled and exits were blocked.

We also learned that the same landlord, Gregory Nisbet, had a second building on Dartmouth Street in even worse shape, with no heat or hot water. And while the city negotiates with Nisbet, we learned that the fire department had not conducted inspections of buildings for more than a year, directing its efforts to other safety projects.

That they couldn’t do both is inexplicable, considering that Portland has one of the biggest fire departments in the region for a city its size. City Hall should demand that the fire chief develop an inspection schedule and be held accountable if it is not met.

But focusing on inspections alone would be a mistake. Nisbet’s Noyes Street property would not have been inspected even if the program had been operating because it had two units and only buildings of three units or more are required to be inspected,

Portland has some of the oldest housing stock in the nation, and a tight real estate market with an apartment vacancy rate near zero.

The shortage of housing drives up rents, and allows unscrupulous or overwhelmed landlords to rent substandard apartments for top rents.

Old buildings can serve for a long time, but they have to be lovingly maintained. Nisbet’s Noyes Street building was 94 years old. The Dartmouth Street property is 105. Neither appears to have been well maintained, but both were filled with tenants.

The city’s lack of affordable and market rate housing creates a distorted market that rewards landlords who cut corners. NIMBY protests of any sizable development like the Federated Cos. “midtown” project add to the problem

There is no one way to make sure that a fire like the one at Noyes Street could not happen again. Regular inspections are part of the solution. But so is building new housing that can meet the needs of people in a range of income brackets, not just wealthy retirees.

New construction that’s affordable for workers and middle-income Mainers would force bad owners of older buildings to shape up.

Portlanders will have to get over their aversion to growth if there is going to be adequate housing to meet the demand. What we have learned in the past months shows what’s at stake.