NEW YORK (CBSNewYork) — FDNY fire marshals have determined the careless use of a candle caused a four-alarm fire at a high-rise building on Manhattan’s West Side.

The blaze, which has been deemed accidental, broke out after a 70-year-old woman’s bathrobe got too close to a candle as she was wrapping gifts and caught fire, officials said.

It happened in a third floor apartment at 515 West 59th St. just before 5 p.m. Thursday.

“She removed the clothing and threw that on the couch, I believe, and left the apartment,” FDNY Chief Roger Sakowich said.

The woman left the apartment door open, which only worsened the situation.

“It made it extremely difficult,” Sakowich said. “With the wind blowing in from the west last night, it pushed the fire down the hallway and up towards the members that were trying to get to it to extinguish it.”

Smoke barreled through the 33-story apartment building with 465 units, used primarily as residences for staffers at nearby Mt. Sinai West Hospital.

Flames were fanned by winds and quickly grew.

“Around 5:15 the winds started picking up and that’s when it really built up the fire,” witness Roshan Abraham said.

“Everybody was panicking, everybody was screaming, hoping everyone was OK,” witness Rosann Duncan said.

Fire investigators say there was a smoke alarm in the unit where the fire broke out, but it was not working, CBS2’s Dave Carlin reports.

As the fire and thick black smoke spread, Shruti Kulkarni, who was visting her cousin, was stuck inside.

“You open the window and you hear people everywhere scream ‘help, please help,'” Kulkarni said.

Kulkarni and her cousin ducked into a seventh floor apartment where a neighbor was pulling people inside to safety, including a mother and her baby.

“He had wet towels for our faces to help us breathe better with the smoke,” Kulkarni said.

Once inside the apartment, she took to Twitter to document her terror.

“Fire in our building and we are trapped inside on seventh floor. Can’t go downstairs. Smoke in the halls. Please pray for us,” she wrote.

Kulkarni and the other people trapped inside all made it out alive, including a 7-year-old girl who had to be revived by paramedics.

“That female has since been revived and is in as good of condition as you can expect after being in cardiac arrest,” FDNY Chief James Leonard said. “The last we heard she was awake and alert.”

Some people managed to escape injury by climbing to the building’s roof.

“We had nine people on the roof. We had good contact, we could watch them,” Leonard said. “They were safe on the roof.”

Twenty people suffered minor injuries; many have been treated and released. Two people remain hospitalized in critical condition. Four firefighters were also hurt.

One of the injured firefighters is still in the burn unit at NewYork-Presbyterian/Weill Cornell Medical Center.

When a fire breaks out in a high-rise building, fire investigators say a safe place may be your apartment if it’s away from the one on fire, and you should shelter in place, call 911, open the windows and use wet towels at the bottom of doorways to keep smoke out.