The blaze broke out just before 2 a.m. on Fifth Avenue in Park Slope, and firefighters arrived to find flames coming from an apartment located above a store on the top floor of the four-story building.
"I kept hearing a lot of alarms," eyewitness Jasmine Reeves said. "I looked out my window, and I saw them pulling out a person out the building. There were flames coming from the top floor."
Crews had to go underneath flames in the doorway of the apartment where the fire started.
They found a 22-year-old man and a 22-year-old woman in the front bedroom. Both were rescued from the apartment, given CPR and rushed to Methodist Hospital.
"It looks like smoke inhalation," FDNY Deputy Assistant Chief Michael Gala said. "Heavy smoke in the front of the apartment, heavy heat in the front of the apartment."
The man, identified as Steven Munoz, was pronounced dead a short time later. He wanted to become an FDNY firefighter and had already taken the written exam and followed up with training.
The woman, identified as Destiny Marmoles, was pronounced dead at 1:17 p.m. Wednesday afternoon.
Officials say the fire was contained to one apartment, and no other injuries were reported.
FDNY officials said the fire didn't spread because the door to the affected apartment was closed, which limited the amount of injuries and saved lives.
"The message is, you need a working smoke alarm," Gala said. "You need to keep that door closed."
The cause of the electrical fire was ruled accidental from an extension cord, according to the FDNY. A smoke alarm was present and operational.