The fire at an apartment building in New York City’s Bronx borough, in which 12 people were killed, was caused by a child playing with a stove, Mayor Bill de Blasio said on Friday, according to WNYC radio station. There were four children among the fatalities.

The New York Police Department said girls aged one, two and seven and a boy whose age was not given were among the dead, The Guardian reported.

“What we think at this point is unfortunately it emanated from an accident, a young child playing with a stove on the first floor,” De Blasio said.

De Blasio earlier called it “the worst fire tragedy in at least a quarter of a century”, and had caused “one of the worst losses in a fire in many years”.

At least 12 people were rescued, he said after firemen put the blaze out.

The fire started around 7 pm local time (5.30 am on Friday, India time) on the first floor of the century-old building and soon spread upstairs, city Fire Commissioner Daniel Nigro said.

The five-storey building has more than 20 flats, The New York Times reported.

“People died on various floors of the apartment, ranging in age from 1 to over 50,” Nigro said. “In a department that is surely no stranger to tragedy, we’re shocked by the lives lost.”

The New York City Fire Department said more than 160 firefighters responded to the four-alarm blaze.