This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

FLATBUSH, Brooklyn — Flames ripped through an apartment building in Brooklyn early Monday, injuring six people, but it could have been much worse if not for a teenager who sprung into action when he saw his neighbors’ home on fire.

Taliq Thomas, 16, was walking home from his friend’s house when he saw smoke billowing from 2126 Nostrand Ave., just around the corner from where he lives. Then he saw people running out of the three-story complex.

“It was two people that jumped, one that landed on the Golden Krust top and another one landed — I pulled out a mattress so he could land and he landed on the cement,” Thomas recalled to PIX11 News. “He was burned all over and he was unresponsive for like a minute.”

After that, Thomas said he and a stranger went upstairs banging on the doors, alerting residents of the fire.

Five of the victims were listed in stable condition early Monday and a sixth was in serious condition, officials said.

Flames broke out about 1:45 a.m., the FDNY said. Firefighters gained the upper hand on the blaze about 45 minutes later and the fire was under control shortly before 2:30 a.m.