ST PETERSBURG, Florida: When Hurricane Hermine bowled on to Florida’s Gulf Coast this month, officials in this city were confronted with a familiar problem: The hurricane and days of rain before it had overloaded St Petersburg’s water pipes and treatment tanks so there was no room for the city’s waste.

As a result, city officials said, over the course of roughly 10 days, St Petersburg authorities released 136 million to 151 million gallons of partly treated raw sewage, mixed with rainwater, into Tampa Bay. Officials said they were still determining the precise amount.

It was the third time in the last 13 months that St Petersburg had discharged significant amounts of sewage containing a variety of bacteria and contaminants into local waters. On Friday, state environmental regulators said they would be looking into how the city handled the hurricane and its efforts to fix the waste-treatment system.

Some residents are angry, worried about the safety of local waters and have said that city leaders could have done more to prevent the situation. Even the city’s public works director, Claude Tankersley, expressed dismay.

“When we’re put into a situation where we have to choose between public health and the environment, either way we lose,” Tankersley said. “The fact that our system was constructed over decades makes it more complicated.”

But ageing infrastructure, increased rainfall and rising sea levels — in this city and in many other areas across the country — are conspiring to make this dilemma more common.

For years, civil engineers have warned that many of the nation’s treatment systems for stormwater and sewage desperately needed either repairs or extensive replacement. Tropical depressions and storms, or sometimes just a brief afternoon downpour, are enough to trigger the all-too-familiar ritual of flooding, sewage spills and public-health warnings in areas where the local infrastructure cannot handle the rainfall.

And as more spills occur, more potential environmental problems arise and bacteria spread. The solutions are usually expensive, time-consuming and politically difficult.

“You simply cannot have a large concentration of people living in a city without a properly functioning water and sewer system,” said Marc Edwards, a professor of civil and environmental engineering at Virginia Tech University, who is credited with uncovering the cause of the water crisis in Flint, Michigan.

Many of the weakening systems in the nation are not just old. In some cities, pipes were made of lead, commonly used before its dangers were known. Two years ago, Flint became a symbol of what can happen when a neglected water system fails its community.

Some cities, though, have taken action.

Boston recently completed a 30-year project to clean the city’s harbour. It built the Deer Island Sewage Treatment Plant, and has replaced much of the city’s sewer pipes at a total cost of $4 billion.

Chicago committed $1.4 billion in 2012 to repair portions of its 4,300-mile network of pipelines and water treatment systems. The city of Tampa, Florida, which discharged 1.7 million gallons of waste because of Hermine, approved a $250 million plan to fix its stormwater system over 30 years, said Harry Cohen, the chairman of the Tampa City Council. Cohen said city officials hoped to complete the project sooner, within 10 years.

In St Petersburg, the city has a plan to spend $100 million over the next five years to overhaul its pipes. To some here, though, it’s not soon enough.

Hermine, a Category 1 hurricane, left cities and counties across Florida and the Eastern Seaboard soaked. Florida suffered roughly $1 billion in economic damage, according to the risk-management group Karen Clark & Co., which is headquartered in Boston.

Florida’s Department of Environmental Protection said that according to its calculations, 240 million gallons of waste were discharged in a four-county jurisdiction that includes the cities of St Petersburg, Tampa and Clearwater — home to more than three million people. The discharge amount may grow, officials said, as more analysis is done.

Some are worried about the environmental ramifications.

“The ecosystem of Tampa Bay was healing more quickly than expected from decades of abuse in the 20th century,” said Kent Bailey, the chairman of the Sierra Club’s Florida chapter, which is based in Tampa. “Sea grass was recovering and scallops were returning. It will take time for the impact of massive sewage discharges into the bay to be measured and assessed.”

Kurt Zuelsdorf, the owner of Kayak Nature Adventures in Gulfport, a municipality which borders St Petersburg’s southwestern city limits, and whose water system falls under the control of its larger neighbour, said he was hanging on by a thread because of the sewage dump. He takes patrons paddling through the Clam Bayou Nature Preserve, which extends out into Boca Ciega Bay and is shared by St Petersburg and Gulfport. Persistent customer cancellations because of the sewage discharges have forced him to lay off employees.

“This has set us back decades,” Zuelsdorf, 55, said. “We’re seeing dead birds washing up on the beaches.”

“It’s a bigger impact than what the city wants to admit, and they’re on damage control right now,” he added.

City officials say local waters in St Petersburg have been tested and are safe for swimming, although some regional beaches still have advisories.