A 13-year-old boy was charged with setting a fire Thursday morning to the west suburban Glen Ellyn apartment building where he lived.

At 8:22 a.m., officers in the area saw heavy smoke coming from the two-story, four-unit building in the 400 block of Ramblewood Drive and found the fire in an upstairs unit, according to Glen Ellyn police and firefighters.

Officers got residents out of the building, and Glen Ellyn volunteer firefighters responded and put out the blaze.

The fire was controlled and contained to one unit, firefighters said. No injuries were reported, and three cats were rescued from the building.

About 8:30 a.m., police arrested the boy nearby, according to Glen Ellyn police. He had set the fire before leaving home, knowing that others remained in the building.

The entire building was deemed uninhabitable, police said.

The boy was being held at the Kane County Juvenile Detention Center, charged with aggravated arson, police said.