A building was struck by lightning Wednesday night in west suburban Naperville, starting a fire that left one of its residential units uninhabitable.

Emergency crews were called at 7:06 p.m. for reports of the lightning strike at a six-unit building in the 3300 block of Rosecroft Lane, according to a statement from the Naperville Fire Department. When firefighters arrived, heavy smoke was showing from the roof of the two-story building.

Firefighters got all residents out of the building and located the fire in the attic, the department said. The fire was out within 20 minutes of the initial call.

No injuries were reported, but the Naperville Transportation Engineering and Development Department deemed one of the units uninhabitable, authorities said. All other residents returned to their homes safely.