NEW YORK -- A firefighter pulled a man to safety in a daring rescue from a massive apartment building fire that left one person dead early Thursday morning on Manhattan’s Upper East Side, CBS New York station WCBS-TV reports.

The six-alarm fire broke out around 3:20 a.m. Flames could be seen pouring out of windows as smoke billowed into the sky.

Residents scrambled to evacuate, and some said they had to use the fire escapes to get out.

Get Breaking News Delivered to Your Inbox

“I just woke up from all the fire alarms, everything was going off,” one woman said. “Opened the back windows, and sparks and fire was flying. We got ready and got out.”

“The hallway was full of smoke, so I went out on the fire escape, and they came up and helped me down,” another man said.

One resident who was trapped on the fifth floor was saved by Firefighter Jim Lee using a lifesaving rope. One witness described what he saw.

“I heard a gentlemen with his head out of the window say, ‘I’m burning,’ and the fireman said to wait, we’re coming to get you, and then I saw a rope go down,” the witness told CBS New York station WINS-AM.

Lee was lowered over the flames that were flying out of the building, grabbed the man and pulled him to safety.

“I grabbed him out of the window, and we went down to the ground, they lowered me all the way down to the ground,” Lee told reporters during a news conference at the scene. “... I just told him to stay calm, and when we got down, I said, ‘I hope you enjoyed the ride.’ He sort of smiled, and he was thankful.”

Lee said 15 seconds after he and the man reached the ground, the rope burned through. The rope is something the fire department says is only used once a year or every few years.

“That’s probably one of the most dangerous evolutions that we do, and that’s why we train so much on it,” Lee said.

The man was taken to the hospital. In all, at least 12 people were hurt, including seven firefighters who suffered minor injuries. Officials said the person who died was found on the third floor of the building.

Crews extinguished the fire but were still putting out hotspots Thursday morning.