A massive leak of toxic coal ash from a retired North Carolina power plant into a neighboring river dwindled on Thursday, utility officials said, but hundreds of workers had yet to seal the breach in a drainage pipe where the leak was detected more than four days ago.

State regulators promised a detailed inquiry into the accident once the area was stabilized and the Dan River’s water was shown to be safe. But environmental and citizens’ groups criticized the response, saying the leak was the result of decades of lax oversight.

From 50,000 to 82,000 tons of coal-ash slurry flowed into the Dan after the collapse of a corrugated metal drainpipe only a few feet beneath a 27-acre pond, known as an impoundment. Duke Energy, the utility that owns the impoundment and the Dan River Steam Station in Eden, N.C., which closed in 2012, says that 27 million gallons of contaminated water also leaked into the river. Coal ash, a murky gray sludge that is the residue from burning powdered coal to generate electricity, contains high levels of toxic elements, including lead, mercury, selenium and arsenic.

The state said it began testing the Dan’s waters on Tuesday for the presence of 28 toxic metals. A spokesman for the state Department of Environment and Natural Resources, Jamie Kritzer, said Thursday that the first results would be available by Friday.