Elgin, IL- Three floors of a residential high-rise in downtown Elgin were evacuated Thursday evening after construction machinery caused high levels of carbon monoxide, fire officials said.

The Elgin Fire Department responded to the six-story building on the 100 block of South State Street after the smoke alarm was activated on the sixth floor, according to a news release.

Firefighters discovered hazardously elevated levels of carbon monoxide on floors four, five and six. About 25 people were evacuated for about 40 minutes, fire officials said.

The cause was construction machinery that had been operated in the building during the day. Nobody was injured.

Fire officials stressed the importance of carbon monoxide detectors and said they prevented this situation from becoming a tragedy.