A massive eight-alarm blaze tore through a Queens apartment building on Tuesday, injuring 21 people, including 16 firefighters, officials said.

The fire broke out inside an apartment and spread to the cockloft in the 150-unit apartment building at 89-07 34 Avenue in Jackson Heights just after 1 p.m., fire officials said.

Late Tuesday night, fire crews were still on scene working to control the blaze, according to FDNY Deputy Assistant Chief Michael Gala.

PHILADELPHIA BOMB SQUAD INVESTIGATES MASSIVE HOUSE EXPLOSION

"This is a very complicated and prolonged operation. Heavy smoke and heavy heat conditions," Gala said Tuesday night.

Photos of the fire, which broke out inside an apartment and spread to the cockloft in the 150-unit apartment building (FDNY)

The injuries sustained by the firefighters and five of the building’s residents were considered non-life threatening, officials said.

NEBRASKA TRANSFORMER FIRE, EXPLOSION PROMPT HOTEL EVACUATION: REPORTS

At least three of the firefighters were burned when they entered the apartment, which had its door left open, FDNY Commissioner Daniel Nigro said earlier Tuesday.

CLICK HERE TO GET THE FOX NEWS APP

"Very difficult for our members, very taxing," Nigro said. The inferno displaced 240 residents from 90 units, officials said.