Patchogue firefighters first went to the Mapletree Apartments for a call about smoky food on a stove.
But as they were wrapping up that problem, the building's carbon monoxide detectors all went off.
The building was evacuated.
The Red Cross helped make arrangements for residents while National Grid worked on the problem.