BUSHWICK, Brooklyn (PIX11) — A three-alarm fire tore through a residential building early Tuesday in Bushwick, leaving two people injured, one critically, according to the FDNY.

The blaze broke out in the three-story building on Goodwin Place near Greene Avenue around 1:45 a.m., officials said.

Firefighters rescued a woman from the building’s second floor, taking her to an area hospital, FDNY Chief of Fire Operations John Esposito said at the scene. A total of two civilians were taken to an area hospital, with one in critical condition and the other suffering what officials described as minor injuries, a department spokesperson added.

“It was an extremely difficult fire for our firefighters,” said Esposito, calling it “very dangerous.”

A total of 138 firefighters from across 33 units brought the blaze under control by 3:20 a.m.

Approximately 50 lithium-ion batteries were discovered inside the charred remains of the apartment where the fire started.

Fire officials believe someone inside the home was fixing lithium-ion batteries and left several charging overnight. They were left unattended, which is something you should never do.

“Do not charge them when you’re sleeping. Do not put them in the only means of exiting your apartment or your hallway,” said Fire Commissioner Laura Kavanagh. “When these catch on fire they burst into flames, so there is almost no way out of your room or out of your apartment.”

The fire at Goodwin Place is the 24th lithium-ion battery fire in New York City this year.