Swansea council noise abatement officials spent more than 12 months investigating the "wailing sounds", which - once a month - start before dawn and go on into the early morning.
Their inquiries led them to the Vale Europe nickel refinery in Clydach.
The refinery said it was drills of their emergency evacuation procedure.
Residents in the Townhill area of Swansea had described the noise as similar to the air raid sirens which sounded over the city during the Blitz 76 years ago, and said it had been distressing elderly people in particular.
Debbie Leyshon, from Townhill, said: "Everyone around here has heard it, it sounds just like a siren you hear in the war films.
"My mother rung really panicking, asking whether she should run or not, because the sound is extremely scary."
A Vale Europe spokeswoman said: "We have legal obligations to test our various alarms and emergency practices regularly.
"We keep the test times as brief as possible to minimise any noise issue for the public, but undertaking such testing is an important safety activity."
The source of a mystery siren which has been waking some Swansea residents for more than two years has been traced to a chemical factory six miles away.