Investigators are working to determine the cause of an apartment building fire in Brooklyn early Thursday morning.

It happened on second floor of a six-story building at 718 St. Marks Avenue in Crown Heights  at around 1:30 a.m.

Residents say they were startled awake by the flames and smoke.

"I hear this crackling, crackling, I thought someone was messing around, I peeped through the keyhole, it was kind of cloudy, I opened the door and all I saw was fire climbing up the stairs," said Marcia Cummins, a building tenant.

"I smelled smoke and I went to the kitchen to see if I left something burning and then I didn't see anything, so I went to the living room to open the door. The door was too hot to open so I had to run for my life down the fire escape," said Deirdre Jeter, a building tenant.

Three people were transported to the hospital in stable condition.  

Seven others, including firefighters, were treated at the scene.