NEW YORK (CBSNewYork) — A family was rescued from the burning home after a fire broke out while they were sleeping in Queens.

The blaze ripped through the three-story home on 71st Street near 31st Avenue around midnight.

Firefighters rescued four members of a family from the second floor. Relatives say it was panic.

“Screaming, everybody running here to here,” relative Saroj Basra told CBS2’s Natalie Duddridge. “After I wake up, I don’t know what happened.”

Basra says firefighters saved a father, mother, daughter and her cousin who was staying over. Both girls are believed to be under the age of 10.

Some neighbors say they saw them being carried out of the burning building.

“I walked out of my house to a couple fireman carrying two children out of the house,” said resident Illya Drivakos. “Tried to resuscitate them.”

The FDNY says two people were taken to Elmhurst Hospital and another was taken to the burn unit at Cornell Medical Center after being pulled from a back bedroom.

“There was a fire in the hallway they had to pass in the bedroom to remove these two victims,” said FDNY Deputy Chief Mark Egan.

Some residents say they dragged a mattress in front of a window so people could jump out and escape the fire.

“One of my friends, he jumped out they took him to the hospital because he banged his head on the AC,” family friend Haseeb Kabir said.

Firefighters were able to get the fire under control within 40 minutes. The cause is still under investigation.