The city fire department is trying to figure out what sparked an early morning fire in Brooklyn that left 12 families homeless.

It started just after 1 a.m. on the top floor of a residential building located at 174 Ashford Street in Cypress Hills. 

"Laying down and next thing I know the top floor is burning up on fire. I don't know what happened, I don't know. I was asleep, I was asleep," said one tenant.

Firefighters got the flames under control by 2:30 a.m. 

One person suffered minor injuries.