NEW YORK, Jan 9 (Reuters) - Nineteen people were killed, including nine children, and dozens were injured when a fire started by a malfunctioning space heater spread smoke through a 19-floor building in The Bronx borough of New York City on Sunday, city officials said.

New York City Mayor Eric Adams, just over a week into the job, confirmed 19 people had died from the blaze that broke out around 11 a.m. in the imposing Twin Parks North West building which provided affordable housing units and was home to a Gambian community.

Earlier on Sunday, officials said 32 people had been hospitalized with life-threatening injuries and some 60 people were injured in total as smoke drifted through the building on a cold winter morning.

"This is a horrific, horrific, painful moment for the city of New York," Adams told reporters. "The numbers are horrific."

The fire itself started from a space heater in an apartment that spanned the second and third floors of the building, and only made it to the hall, officials said.

But smoke still spread to every floor of the building, likely because the door to the apartment was left open, the city's fire department commissioner Daniel Nigro told reporters at a news briefing.

"Members found victims on every floor in stairwells and were taking them out in cardiac and respiratory arrest," Nigro said.

Fire marshals had determined through physical evidence and accounts from residents the fire started in a portable electric heater in the apartment's bedroom, Nigro said. He added the heat had been on in the apartment building and the portable heater had been supplementing that heating.

The catastrophe was likely to stir questions on safety standards in low-income city housing. This was the second major deadly fire in a residential complex in the U.S. this week after twelve people, including eight children, were killed early on Wednesday when flames swept through a public housing apartment building in Philadelphia.

U.S. Representative Ritchie Torres, a Democrat whose district includes the New York building, told MSNBC that affordable housing developments such as the Bronx one pose safety risks to residents. "When we allow our affordable housing developments to be plagued by decades of disinvestment, we are putting lives at risk," he said.

Adams said many of the residents were from the small west African country of Gambia. The Gambian consulate in New York did not immediately respond to a request for information.