It’s been almost a year since a deadly fire in a Portland duplex shone a glaring spotlight on the safety of the city’s rental housing stock. Now the city’s finally putting some teeth into its code enforcement and going to court to hold landlords accountable for their buildings’ habitability.

The 2014 blaze at 22-24 Noyes St. – which took the lives of six young people – was found to have started by accident. But the likely cause of the fatalities was the building’s life-safety violations, including blocked exits and disabled smoke alarms.

Until recently, the city took a hands-off approach to making sure that noncompliant landlords got their buildings up to code. In theory, landlords were given 64 days to respond to the city’s notice of violations or face litigation. In reality, that timeline was often stretched out for months or even years, and municipal follow-up was hit or miss.

But Portland officials are no longer brooking such foot-dragging. When a landlord fails to correct a safety violation, fire inspectors and city attorneys are issuing court summonses and threatening to impose fines.

And it’s working. One example is a two-family building at 592 Washington Ave. that had been a problem for the city for years. In fact, it’s on an internal city list of properties that have so many violations or life-safety issues that they’ve been deemed off-limits for recipients of General Assistance.

After getting a summons in July to appear in District Court, however, the owner took action to resolve the multiple problems there, and the case was dismissed Sept. 14, said Adam Lee, associate corporation counsel for the city.

The crackdown has caught property owners off guard, the head of a local landlords group recently told the Press Herald. But the calls for and development of the new enforcement process have gotten a lot of publicity. And property owners who weren’t expecting change in the wake of the Noyes Street tragedy would have to have been doing some wishful thinking.

What’s more, the city has shown it’s willing to work with landlords, as the Washington Avenue case shows: An initial inspection was followed by swift enforcement. Further inspections took place in order to assess progress, but the case remained on the court docket until all the violations were fixed.

What city officials are doing is in everyone’s best interests. Tenants get safe housing, and property owners get a chance to correct issues before they become out of control. Ensuring that Portland’s rental properties are fit to live in won’t be an overnight process, but this is a good start.