By Jeremy Ross

CHICAGO (CBS) — Fast-moving flames sent tenants running from their homes, after a fire broke out in a Crystal Lake condominium building.

The fire started around 3 a.m. at a two-story building at 540 Devonshire Lane. When firefighters arrived, flames were visible on the roof.

Police and firefighters evacuated the entire 19-unit building, including some tenants who were trapped, as firefighters doused the flames. Officials say a candle is the likely cause of the fire.

“We came down a ladder off our balcony. Yeah, we were trapped up there. We were totally trapped. The hallway was totally filled with smoke, and flames were engulfing the roof,” tenant Keith Burg said. “This is terrible. It’s a tragedy.”

The fire started in a second-floor apartment, or possibly the attic. The blaze turned into a three-alarm fire as flames quickly spread the entire length of the building.

“I heard pounding, and didn’t know what it was. Then I saw lights, thinking it was maybe a paramedic or something, and I went on my patio, and they just started screaming ‘There’s fire. Get everyone out. Get your neighbors out,’” tenant Jennifer Sciascia said. “It was engulfed by the time we came out. It was just completely engulfed. I don’t know how it got so bad so quick.”

A total of 21 agencies responded to help extinguish the fire, which was brought under control around 5:20 a.m.. One firefighter did suffer a minor, undisclosed injury.

Firefighters said the building was a total loss.

“Once we get to a point with the investigation and we believe that the building is stable, we will try to work the residents into the building to get whatever’s salvageable out of the building. It’s kind of a complete loss, unfortunately,” Crystal Lake Deputy Fire Chief Chris Olsen said.

Officials said 40 people were left homeless due to the fire, which caused more than $3 million in damage. The American Red Cross was providing them assistance, and a nearby church opened its doors to people who were forced to evacuate the building.