MACHIAS, Maine — The state Department of Environmental Protection has notified Machias officials that the town violated its wastewater permit in June when it discharged untreated sewage into the Machias River, an incident that resulted in nearby areas being closed to shellfish harvesting.

DEP has given the town a notice of violation in conjunction with the June 12 discharge from the town’s wastewater treatment facilities into the Machias River. The agency is in the process of developing a consent agreement to require the town to make improvements and impose possible penalties. Town Manager Chris Loughlin briefed the Board of Selectmen on the matter Wednesday night.

The state Department of Marine Resources ordered tidal mudflats in the area closed the same day as the discharge in order to prevent the harvest and consumption of polluted shellfish. The closures applied to tidal mudflats in Machias, East Machias and Machiasport, which is the third-largest soft shell clam producing area in Maine. Some areas were reopened July 17 but were closed again July 26 when heavy rains caused a bypass at the wastewater treatment plant.

There are about 100 clam diggers downriver in Machiasport, Loughlin said in his briefing to the selectmen, acknowledging the effect on their livelihood has been “huge.” Clammers in the area harvested 700,000 pounds of shellfish in 2012, earning $880,000, according to DMR.

“We’re putting people out of work,” said board chairman Aubrey Carter. “We shouldn’t be doing that.” The town needs to be prepared for incidents like the one that occurred in June, he said.

The incident resulted in 480,000 gallons of untreated sewage being discharged into the tidal river; it was discharged from the wastewater treatment plant outfall and also the combined sewer overflow or siphon chamber on the south side of the river. Initial reports indicated the volume was about 50,000 gallons.

“The Department of Environmental Protection is particularly concerned about this event [in June] because it indicates a lack of operational preparation, control, and response that appears to be systemic,” Pamela Parker, enforcement coordinator for the DEP division of water quality management, wrote to town officials in a letter dated Aug. 8. The letter made no reference to the July incident.

“It appears that the operation of the plant has been conducted in a way that has not addressed a number of issues that have been pointed out by our inspections on a repeated basis,” Parker said in a phone interview Thursday. In addition, the wastewater plant has been operated “contrary to the way recommended by the designer” of the upgraded facility, she said.

Parker was unable to say the maximum fines the town may face. She was not familiar with the agency’s penalty policies, she said, other than minimum penalties of $100.

“We’re still in the data gathering process,” said Parker. “I’m doing a very careful review of all the files and the records.”

The discharge in June was prompted by a local power failure experienced by Bangor Hydro Electric. The power outage affected the wastewater treatment plant about 5 a.m. An emergency generator was activated, but malfunctioning electrical equipment prohibited pumps from switching to generator power. According to the notice of violation, influent pumps stopped, backing up wastewater in the treatment plant building. In addition, a pump station at the combined sewer overflow — handling both sewage and stormwater runoff — did not activate because it had been set for manual operation, not automatic, causing further flooding at the treatment plant building. The backup also caused the siphon chamber to fill and overflow.

The flooding at the plant was alleviated, power restored and the pumps operational again by late afternoon.

There have been problem with the influent pump controls in the past and they have been repaired, but the problems have continued, according to the notice of violation. In addition, the combined sewer overflow pump had been activating improperly at low flow when set to automatic operation, so it had been switched to manual operation, and the operator had not addressed the reason for the early activation.

The notice of violation was critical of the town’s fire department for failing to contact a wastewater treatment plant operator when the incident occurred. “The alarm process failed when the fire department received the alarm, called one of the phone numbers on file but did not make contact with the person, and did not proceed down the list of contacts until they reached a responsible person,” according to narrative contained in the notice. “Ultimately, the alarm message did not reach an operator.”

Loughlin said that if the plant had been operating on automatic mode, there still would have been a violation, “but the system would have responded to the malfunction as designed.”

The combined sewer overflow pump station would have closed, and the flooding of the pump room at the treatment plant would not have occurred. That flooding slowed the town’s ability to minimize the discharge into the river, he said.

“The failure of the fire department to continue to call the operators until they made contact showed us that trying to have them respond to sewer alarms in addition to responding to fires and ambulance calls is probably beyond their resources,” said Loughlin, adding that the town is looking at using the services of an alarm company.

DEP is requiring the town to complete an engineering assessment of the incident to determine equipment and operational deficiencies and a plan for correcting them. It also is requiring an evaluation of the influent pumps, which are not submersible but have been completely submerged at least twice. The agency also wants an evaluation of the alarm system, including activation and notification processes, and a plan for corrective action.

The selectmen briefly discussed the idea of constructing a storage tank on the south side of the river that could be used to temporarily hold incoming sewage and stormwater runoff in such situations, but the board took no action. A storage tank “would provide another level of safety,” Loughlin told the board.