Three people died and 14 were injured early Monday morning after a fire tore through a six-story apartment building in Upper Manhattan, Fire Department officials said.

The deceased victims, who were not identified, were pronounced dead at the scene, the officials said. Nine people were sent to area hospitals, including five whose condition officials described as severe, two with moderate injuries and two with mild injuries. One firefighter was treated for minor injuries at the scene.

The Fire Department said it received a call at 12:35 a.m. reporting a fire on the second-floor of the building, at 207 Dyckman Street. The first trucks arrived three minutes later and began rescuing residents on the building’s fire escapes as the fire stretched from a first floor hallway to the bulkhead on the roof. Officials said the fire was under control at 3 a.m.

Commissioner Lillian Bonsignore said the fire had been able to spread more quickly because fleeing residents had left their apartment doors open. Eight apartments were heavily damaged in the fire, officials said.

“I know it’s a scary situation in a fire,” she said at a news conference. “We’re not always thinking straight. But close the door. Make sure all your family members know to do the same.”

More than 100 people have been displaced by the fire, officials said. About 190 firefighters and emergency medical workers responded to the scene.

The cause of the fire was not known. Officials said the fire marshal was investigating.

Thirty-six people have died in fires in New York City this year, including the deaths on Monday, officials said.