A fast-moving fire tore through a Brooklyn apartment building Tuesday.

Flames broke out in a second-floor apartment of a four-story building on Linden Boulevard and East 54th Street in East Flatbush just after 4:30 p.m.

The fire spread to the upper floors and to a house next door.

No injuries were reported, but there was extensive damage.

It took firefighters less than two hours to get it under control.

"They went in with the hoses and put out all three floors of fire. Also, they hit the outside of this building, saved that, and went inside and put that building out also," said Battalion Chief Steven Treco of the FDNY.

"The flames just started to burst, and then it spread to the other house," said one witness.

"I was stuck in my apartment. The fire alarms were going off. When I opened my door, all that black smoke came in," said another.

The Red Cross is assisting eight families who were displaced by the fire.  

The cause is still under investigation.