A faulty valve caused the accidental release of about 2 million gallons of untreated wastewater into a slough in Sonoma Valley, a county water official said Saturday.

The valve on a pipeline in the Sonoma Valley County Sanitation District failed to fully close and was leaking wastewater for about 24 hours into Schell Slough, said Ann DuBay, a Sonoma Water spokeswoman. The flow was stopped at 10:45 a.m. Saturday, she said.

State and regional authorities were notified, and specialists sent to the spill site did not notice any dead or distressed fish or other species, DuBay said.

The valve is part of a system that collects wastewater from the equivalent of about 17,000 Sonoma Valley homes. The wastewater is treated at a plant on Eighth Street East, near the city of Sonoma.