FDNY Commissioner Daniel Nigro said the fire started in the kitchen of a first-floor apartment as a 3-year-old boy was playing with the burners.
The boy's mother was alerted to the fire by the boy screaming, Nigro said. She escaped the apartment with her kids but left the front door open.
Nigro said this caused the fire to spread to the rest of the building very quickly by traveling up the stairs. It acted like a chimney and people in the rest of the building had very little time to react.
Mayor Bill de Blasio called it a "horrible, tragic accident."
"Children starting fires is not rare," Nigro said, adding that the city has a program to educate the public about fire safety. He said that if there is a lesson to be learned from this tragedy is that if you have an apartment fire you must close the front door.
"We're told the boy had a history of playing with the burners and turning them on, and before the mother knew it, this fire had gotten a good hold in the kitchen," Nigro said. "She said it was a lot of fire, a lot of smoke, grabbed the children and ran out."
She failed to close the door behind her and so the fire, hungry for oxygen, raged right through, pouring down the hallways and turning the central staircase into a chimney of death.
"Based on research we have right now, it does not appear anything problematic with the building or the fire safety in the building," the mayor said on WNYC radio. "Just a fire that spread very very quickly, and took so many lives."
Watch the full update from FDNY here:
It's the worst fire tragedy in NYC in at least a quarter of a century. The victims killed were seven adults and five children -- ranging in age from 1 to 63. Four people remain in critical condition. All people in the building have been accounted for, FDNY officials said.
RELATED: What we know about the Bronx fire victims
The 5-alarm fire broke out just before 7 p.m. on Prospect Avenue near East 187 Street. FDNY firefighters arrived at the scene within three minutes.
PHOTOS from the scene:
Smoke was billowing out of the windows as firefighters cradled a baby and rescued at least a dozen people clinging to the fire escape. The ones that used the fire escapes and windows survived. The others that tried to use the inside staircase did not.
The fire was brought under control just after 9 p.m. ET. The scene is described as having a very heavy smoke condition. The victims perished on every floor of the building.
Investigators initially pointed to a natural gas line as possibly fueling the fire and causing it to spread quickly, but officials with Con Edison said there is no indication natural gas was involved in the fire.
More than 170 firefighters responded to the scene.
"In a department that's certainly no stranger to tragedy we're shocked by this loss," FDNY Commissioner Daniel Nigro said.
The Office of Emergency Management and the MTA sent buses to the location to accommodate residents that have been evacuated from the building.
RELATED: Residents speak out about losing everything in fatal Bronx fire
"Based on the information we have now, this will rank as one of the worst losses of life to a fire in many, many years," Mayor de Blasio said during a press conference at the scene.
* More Bronx news
* Send us a news tip
* Download the abc7NY app for breaking news alerts