NEW YORK (CBSNewYork/AP) — City officials say they have pinpointed the source of the Legionnaires’ disease outbreak in the South Bronx that left 12 people dead.

The Legionella strain found at the historic Opera House Hotel’s rooftop cooling tower matched the strain found in all 25 patients for whom testing is complete, officials announced Thursday.

MORE: Five Facts About Legionnaires’ Disease

City officials also declared the outbreak over, saying there have been no new cases since Aug. 3. The incubation period for the disease is two to 10 days.

“Today, I’m happy to declare that the outbreak is over,” Health Commissioner Dr. Mary Bassett said.

Dr. Jay Varma, city deputy health commissioner for disease control, said health officials investigating the outbreak learned nine days into their probe, on July 29, that a guest who had stayed at the hotel had become ill.

In all, there have been 128 cases and almost all patients hospitalized with the disease have been discharged, officials said.

“We eliminated the danger posed by the Opera House Hotel’s cooling tower as soon as it tested positive for disease-causing Legionella,” Bassett said in a news release. “Today, all cooling towers in the affected area have been disinfected, and all cooling towers across the City are being evaluated and disinfected if necessary.”

Cooling towers in 18 buildings tested positive for the bacteria, and the outbreak prompted city and state officials to require the testing and inspection of building cooling towers across the state. The towers emanate warm mist that can spread bacteria.

“Control of Legionella is complex, and disease detection, environmental science, and laboratory advance work helped bring this unfortunate outbreak to an end,” said Dr. Anne Schuchat, assistant surgeon general and director of the CDC’s National Center for Immunization and Respiratory Diseases. “We hope to advance the science about how to improve control from New York’s experience. The quick and thorough reaction from local and state authorities likely prevented many others from developing Legionnaires’ disease.”

On Tuesday, Mayor Bill de Blasio signed new legislation into law aimed at regulating cooling towers in response to the outbreak.

The new law requires landlords to register, inspect and regularly clean cooling towers. Building owners would also need to get an annual certification. Those who do not comply would face fines up to $25,000, WCBS 880’s Rich Lamb reported.

Legionnaires’ disease — a form of pneumonia especially dangerous for the elderly and for people with underlying health issues — can usually be traced to places favorable to Legionella growth such as cooling towers, hot water tanks, whirlpool spas, hot tubs, humidifiers and condensers in large air conditioning systems. It is spread through contaminated mist and is not contagious.

Symptoms of Legionnaires’ disease include headache, fatigue, loss of appetite, confusion and diarrhea.

The Opera House Hotel’s building is more than a century old and once housed performances by Harry Houdini, the Marx Brothers and George Burns. It’s in the heart of the South Bronx.

After speculation last week on the source of the outbreak, the hotel said that its 2-year-old cooling tower has been cleaned routinely and that managers acted quickly to get it cleaned again after learning of the Legionnaires’ problem.

“We did not wait for test results; we acted quickly,” Glenn Isaacs, vice president of owner Empire Hotel Group, said in a statement at the time.

He complained that city health officials hadn’t been forthcoming. A City Hall spokeswoman said officials had been communicating with the hotel but noted patient privacy laws.

A representative for the hotel didn’t immediately return a call seeking comment. The hotel was open Thursday.

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)