Six people were killed and seven others injured, among them three firefighters, when a fire swept through a residential home in New York City in the early hours of Thursday, the city's fire department said.

The blaze was reported in Brooklyn's Sunset Park neighborhood, where flames engulfed a two-storey house on 58th Street between 6th Avenue and 7th Avenue at about 1:40 a.m., according to witnesses and the authorities. The fire spread throughout the building and to a neighboring home before crews were able to contain it.

More than 200 first responders rushed to the scene to fight the flames and reach people trapped inside, the New York fire department said. It took roughly three hours to bring the fire under control, and investigators were working to determine what started it.

Four of the victims died at the scene, the fire department said, while two people with critical injuries were pronounced dead after being taken to a hospital. Four other people suffered injuries described as not life-threatening, and three firefighters sustained minor injuries. Officials had not released the names or ages of those killed as of early Thursday morning.

Investigators recovered a lithium-ion battery, and possibly two, from the scene, though the fire department said it was not yet known whether the devices were connected to the cause of the blaze. The discovery comes amid a nationwide rise in fires ignited by lithium-ion batteries, which power e-bikes, electronic chargers and a range of household devices.

Mayor Zohran Mamdani praised the emergency response during a television appearance Thursday morning. "We are currently tracking this fire that claimed the lives of six New Yorkers. It is devastating," he said. "I want to always acknowledge the courage of our firefighters, who go in every single day, no matter what the level of danger is, looking to save peoples' lives."

Mamdani also pointed to the growing fire risk linked to e-bikes. "We are investigating what the cause of this fire is, but I can tell you that e-bike fires as a whole have increased to more than 400 fires this year," he said, as reported by ABC News. "They are something that can cause people to lose their lives as well as their livelihoods. We are really looking at every avenue, we have to keep them safe."

Authorities said the investigation into the cause of the Sunset Park fire was continuing on Thursday.