That's according to New York City Fire Department Commissioner Daniel Nigro, who spoke to reporters on Monday.

"We're certain that the fire started with the faulty electrical heater, a portable heater. The fire was contained to the hallway, just outside this two-story apartment. But the smoke traveled throughout the building, and the smoke is what caused the deaths and the serious injuries."

Nigro said residents of the apartment fled once the fire broke out, but that the door behind them stayed open.

"The door was not obstructed. The door, when it was fully opened, stayed fully opened, because it malfunctioned."

Doors in apartment houses are required to close automatically to prevent fires from spreading through the building.

Authorities said they were investigating a possible "maintenance issue" with the door that failed to close.

New York City Mayor Eric Adams was quick to defend residents from blame, saying they were already traumatized by the terrible loss.

"We don't want to add more trauma on a family that was just trying to escape a very dangerous and a very frightening experience."

The fire broke out on Sunday morning in the 19-story building, which provided affordable housing units for low-income New Yorkers.

The fatal blaze follows another in Philadelphia just last week, that left 12 dead inside a public housing building.