PORTLAND, Maine — As city leaders discuss the stormwater problem that will take an estimated $170 million to fix — on top of $94 million already or soon to be spent — it’s important to look at the problem in context.

There are 772 communities around the country that have the expensive problem of combined sewer overflows, or CSOs. As the name suggests, a CSO line means both sewage and storm water share a pipe. During heavy rains, the system can be overloaded, and a combination of raw sewage and stormwater is shunted directly out to waterways — brooks, streams, rivers, the ocean.

As a result of former Maine Sen. Edmund Muskie’s landmark Clean Water Act in 1972, CSOs were targeted as water contamination sources. About 20 years ago, communities began agreeing to federal mandates with the Environmental Protection Agency to begin addressing their CSO problems.

According to experts, many communities first went after the low-hanging fruit — the relatively easy CSO projects such as separating sewage and stormwater pipes during road reconstruction projects. What’s left now are the more complicated, and expensive, projects. Portland has worked on projects since 1993, with more than 100 of them worth $94 million done or planned. The last bit, planned for the next 15 years, is the $170 million piece.

“It’s something that really moves at a snail’s pace, and it’s mostly due to the expense,” said Tom Groves, director of wastewater and onsite programs at the New England Interstate Water Pollution Control Commission. “The only way to handle the CSO is to put in some type of underground storage tunnel system. That’s a huge undertaking of not only money but land space. Where are you going to find the land to do something like that?”

Portland is no different from many communities that only recently have begun taking on bigger pieces of the problem but have been stymied due to the economy, said Groves.

“It’s a lot of money in a good economy. What’s happening right now, with the economy being so bad, it’s even harder to swallow for communities,” said Groves.

So where does Portland fit into the Maine picture?

Maine has 32 communities with ongoing CSO problems, according to the latest report from the Department of Environmental Protection, and down from an original 60. They range from Madawaska, which empties into the St. John River, down to Sanford, which discharges into the Mousam River, and mark the state’s growth along waterways and the coast.

There are 163 CSO discharge points, or outlets, across the state, down from 340 in the early 1990s.

As the state’s largest city, Portland accounts for the lion’s share of the problem. According to the DEP, CSOs from the city and from the Portland Water District made up about 44 percent of the state’s total overflow in 2011, with an estimated 496.3 million gallons of overflow emptying into the Back Cove, Casco Bay, Fore River and Portland Harbor. A total of 1.14 billion gallons emptied from CSOs into waterways across the state last year.

For some context, the EPA notes that the city of Philadelphia annually discharges about 14 billion gallons from its CSOs.

Maine’s larger cities contribute the most to the CSO problem. Bangor has nine CSO outlets, and in 2011 discharged 146 million gallons, or 13 percent of the state total. Brewer has only five CSO sites, according to the DEP, but discharged 140 million gallons, or 12 percent.

And while Portland’s problems seem daunting, with $170 million ahead of it, the city has done a big chunk of work already.

As recently as 2008, according to state records, there were 33 CSO discharge points in Portland. The DEP put that number at 21 in 2011. The discharge points are eliminated as the city separates piping, ensuring that wastewater and sewage don’t travel in the same system.

Statewide, CSO communities have spent $415.1 million to deal with the problem, and anticipate spending more than $342 million going forward.

Looking at the problem regionally, it can be a challenge to compare one state to another. For example, while the EPA has Maine with twice as many CSO permits as Massachusetts, the reason boils down to simple geography. Maine’s communities are more spread out across the state, so a larger number of permits is needed to cover smaller problems. In Massachusetts, there are large wastewater utilities that hold a single CSO permit for multiple towns and cities.

One comparison that can be made is the total number of CSO discharge points, or outfalls. There are 8,738 CSO outfalls nationwide, according to the U.S. Environmental Protection Agency. Regionally, Massachusetts has 301, Maine 163, New Hampshire 35, Connecticut 113, Vermont 63 and Rhode Island 67.

Different communities are dealing with CSOs in different ways. For years, the general approach was to separate the sewer and stormwater pipes. During a heavy rain, the stormwater would flow directly to the waterways with the sewage piped to a treatment plant.

But in recent years the impact of that untreated runoff on the environment has changed the thinking. Now, the general thinking is that even stormwater runoff should be treated to get rid of phosphorus, nitrates, oils, salts and other contaminants present on lawns, roadways, parking lots, and other surfaces.

The goal, said Paul Birkel, senior vice president with Topsham-based engineering firm Wright-Pierce, is to at least get the “first flush” treated. It’s estimated that 90 percent of the contaminants in storm runoff come with the first inch of rain — the first flush.

Communities are moving toward a “store and send” way of dealing with runoff. That means storing the excess water in various ways before sending it to be treated at the plant when it can handle the extra load.

Some communities such as Atlanta, Chicago, Providence, R.I., Fall River, Mass., and others have built deep storage facilities — tunnels from 10 to 28 feet in diameter, up to 200 feet down into the bedrock, linked with concrete. Those tunnels store runoff, and the water is later pumped out to the treatment plant. That’s an expensive solution, he said.

Others are using shallow storage, either in-line sections of very large pipes or off-line holding tanks just aside from the system, sometimes under parking lots. That was done in a recent Bangor project, Birkel said.

Portland’s latest strategy for dealing with runoff water is one that all communities will have to consider soon, suggested Birkel. Pending federal regulations will hold communities responsible for the health of their watersheds. Even if they don’t have CSOs, they will have to figure out ways to lessen the stormwater runoff contamination of those watersheds.

When the Clean Water Act was passed in the 1970s, the federal government funded wastewater treatment projects around the country throughout the decade. That sort of funding no longer exists.

Groves, from the New England group, added that while some projects were funded through congressional earmarks, that practice has stopped. And, he said, a federal revolving loan fund aimed at wastewater projects is chronically underfunded.

“Essentially, communities are faced with funding improvements solely on the backs of the sewer users,” said Birkel.