MILWAUKEE (AP) — Days of heavy rain this month overwhelmed Milwaukee’s sewer system, sending millions of gallons of untreated wastewater into area rivers and Lake Michigan.

The Milwaukee Journal Sentinel reported that storms on Aug. 6 triggered the overflow and more rain on Aug. 7 and Aug. 8 prolonged the flow. About 380 million gallons of untreated wastewater found its way into the Menomonee, Kinnickinnic and Milwaukee Rivers as well as Lincoln Creek and Lake Michigan.

As much as 7 inches of rain fell in some areas of Milwaukee between Aug. 6 and Aug. 11. One inch of rain across the 28 communities that that the Milwaukee Metropolitan Sewerage District serves creates 7.1 billion gallons of water flowing into the sewer systems.

The district has the ability to allow overflows in order to prevent sewage backups in homes and businesses. Overflows are used after tunnels fill during heavy rain events and more water flows into treatment plants than can be processed.

“The only way to relieve of too much water is a relief valve, which allows the untreated water, the groundwater, sewage and rain water, to go into the nearest creek, stream or river untreated,” said Bill Graffin, the district’s public information manager.

The state Department of Natural Resources allows MMSD six such overflows annually.