The storm that dumped more than 6 inches of rain on parts of southern Maine Wednesday night has prompted clam flat closures and public health advisories on beaches because of potential contamination from overflowing sewers.

Even before the storm was done drenching southern and central regions of the state, the Maine Department of Marine Resources issued a notice closing coastal areas from the New Hampshire border to Harpswell to collection of clams, mussels and other shellfish.

Some of those areas were already closed to shellfish harvesting because of red tide, the phenomenon caused by elevated levels of a poisonous algae. Wednesday night’s widespread closure was sparked by concerns about higher levels of fecal matter being carried into coastal waters by rivers, streams and overflowing sewer systems.

Many beaches in southern Maine – including those in Wells, South Portland and parts of Kennebunkport and Ogunquit – also posted precautionary advisories urging beachgoers to avoid contact with the water because of possible contamination. Wells also formally closed some beaches to swimming on Thursday because of rough surf, Wells Fire Chief Daniel Moore said.

Contact with water contaminated with fecal coliform from raw sewage can cause infections as well as more severe gastrointestinal illnesses from bacteria such as E. coli and giardia.

Keri Kaczor, coordinator for the Maine Healthy Beaches monitoring partnership, said 1 inch of rain in a 24-hour period – and sometimes less in particularly problematic areas – is enough to trigger a recommendation that people avoid the water on beaches close to rivers and outlets. So 6-plus inches certainly raises contamination concerns, prompting her organization to send an email blast to towns all along the southern coast urging the advisory postings, she said.

“The bottom line is you may want to avoid any kind of water contact for at least a day or even two days just because there is such a high risk,” Kaczor said.

Raw sewage enters rivers and coastal waterways primarily through combined sewer overflow systems. During normal operations, the pipes carry both sewage and stormwater runoff to treatment plants. But when the flow exceeds the capacity of sewer systems or treatment plants during heavy storms, the systems overflow and discharge into local waterways without treatment.

The city of Portland is in the middle of a decades-long effort to reduce its sewage overflows as part of a 1993 consent decree with the U.S. Environmental Protection Agency. Under that agreement, the city must reduce by 80 percent the estimated 840 million gallons of overflow water that entered local waterways in the baseline year.

The city has spent an estimated $100 million on infrastructure improvements so far and begins a second phase this year expected to cost $170 million. Those costs will be borne by ratepayers, who could see sewer rates increase on average of 10 percent a year. City officials will begin discussing the new rates and fees next week.

Mike Bobinsky, director of the Portland Department of Public Services, said the city is roughly half-way toward that required reduction. But heavy storms – and especially storms of Wednesday’s magnitude – still overwhelm the system, resulting in millions of gallons flowing into Back Cove, the Fore River and Casco Bay.

“We are making good progress,” Bobinsky said. “It is certainly not there yet.”

It was unclear how much overflow entered the waterways around Portland during Wednesday’s storm. The city operates monitors on some overflow outlets, however that data was not immediately available Thursday.

But Bobinsky said one recent improvement was put to the test Wednesday night. Enormous conduits capable of storing 2 million gallons of wastewater and storm water were installed under Baxter Boulevard and Payson Park. Those storage systems are designed to hold the overflow until it can be sent to the treatment plant.

“It is functional and last night it was at capacity,” Bobinsky said. “It collected 2 million gallons, if you will, of overflow.”

That is 2 million gallons that otherwise likely would have flowed into Back Cove, he said.