Nine people, including five firefighters, were injured when a fire tore through a Brooklyn apartment building Wednesday.

It happened inside a unit on the 12th floor at the Ebbets Field Apartments in Prospect-Lefferts Gardens.

Four rooms in the apartment were fully engulfed by flames. Firefighters said the clutter found inside the unit made battling the blaze more difficult.

"They started throwing everything off the terrace after that because they couldn't control the fire," said witness Lisa Murray.

"Made it difficult for us to operate in the apartment, to move and maneuver," said FDNY Deputy Chief Stephen Moro. "We actually had smoke that was banking down to lower floors."

It was moving to other floors and filling the hallway with smoke because fire officials say residents left their door open.

"That's critical because that contains the fire and it prevents fire and smoke spread," said Moro. "So that's a critical thing to do. Closing the door is probably one of the most important things to do."

The residents managed to escape from their unit, but collapsed in the hallway.

Four residents in all suffered non-life threatening injuries. Five firefighters suffered smoke inhalation.

The cause of the fire is under investigation.

The same complex was the scene of a fire in 2008 that killed an FDNY lieutenant.