This story was originally published by The New Republic and is reproduced here as part of the Climate Desk collaboration.

Michigan Gov. Rick Snyder in recent weeks has come under intense pressure over the water crisis in Flint, Mich., which was precipitated two years ago when his administration, in an effort to cut costs, changed the city’s water supply from Lake Huron to the Flint River. The move led to a dangerous increase in lead in the water supply; just 5 parts per billion is cause for concern, especially for children, but Flint’s tap water has had five times that amount. And yet, officials insisted until late last fall that the water was safe for its 100,000 residents to drink.

Help Grist raise $25,000 by September 30 to further advance our climate reporting

In response to a public outcry, Snyder has released nearly 300 pages of emails that reveal how poorly state agencies responded to the slow-moving crisis. But while Snyder, a Republican, and his appointees have borne the brunt of the outrage, it turns out the Environmental Protection Agency fell down on the job, too.

Donald Trump, who’s promised a “tremendous cutting” of EPA funds if elected president, said this week the agency is “really guilty of” the Flint “horror show.” For once, Trump is not entirely wrong.

Grist thanks its sponsors. Become one.

On Thursday, EPA Region 5 Administrator Susan Hedman announced she will resign from her post. But the EPA, while contrite, hasn’t admitted wrongdoing. Like every other agency facing criticism for the water crisis, it has shifted the blame elsewhere — to Michigan’s state officials.

“Under the Safe Drinking Water Act, the state of Michigan was responsible for implementing the regulations to protect their residents’ drinking water,” an EPA spokesperson said this week. “EPA’s ability to oversee management of that situation was impacted by failures and resistance at the state and local levels to work with us in a forthright, transparent, and proactive manner consistent with the seriousness of the risks to public health.”

“It is important to understand the clear roles here,” Hedman told The Detroit News. “Communication about lead in drinking water and the health impacts associated with that, that’s the role of [the Department of Health and Human Services], the county health department and the drinking water utility.”

It was only once Flint became a national story, and Snyder and President Barack Obama declared a state of emergency, that the EPA admitted its initial response was too slow. Residents and the American Civil LIberties Union were still petitioning the EPA to act in October, long after the agency first became aware of potential problems.

Grist thanks its sponsors. Become one.

In April 2014, Flint’s residents, the majority of whom are black, were assured by the Michigan Department of Environmental Quality (DEQ) that “the quality of the water being put out meets all of our drinking water standards and Flint water is safe to drink.” The EPA didn’t know something was amiss until February 2015. Miguel Del Toral, a water expert with the EPA Region 5 office, noted in February that Flint’s water wasn’t being treated for lead since the switch to Flint River and that state tests were understating the problems, according to documents obtained by the ACLU.

Del Toral raised two main concerns: The water wasn’t being treated properly and the testing showing the water was safe was inaccurate. “I’m worried that the whole town may have much higher lead levels than the compliance results indicated,” Del Toral warned in an April memo to DEQ, which was summarized in the email batch released Wednesday.

According to a memo from June that was later leaked, Del Toral was concerned that Flint did not use the same chemical treatments for lead and copper after it made the switch in 2014, and that corroded plumbing was likely leaching lead: “In the absence of any corrosion control treatment, lead levels in drinking water can be expected to increase.” Compounding the problem, Michigan instructed residents to “pre-flush” their taps before sampling, leading to depressed reporting of lead levels.

For the next six months, the agency was in a dispute with Michigan officials over how it interpreted water treatment under the 25-year-old EPA regulation on lead and copper.

But the EPA’s public position throughout was that Flint’s water remained within a safe range, even as they privately pressured state officials to do more. It wasn’t until last November, shortly after Michigan began acknowledging problems, that the EPA aired Del Toral’s initial concerns publicly.

The agency has since explained it kept concerns private because of delegated roles under law. It’s the EPA’s authority to set treatment and testing standards, but it’s up to the state to ensure its water operations comply. And that’s where the EPA insists Michigan failed.

Ultimately, state and local water agencies are responsible for correct monitoring and reporting on water quality, and to implement the standards that federal officials set. That doesn’t mean the EPA is blameless. The EPA didn’t act as urgently and as transparently as it could have to help the people of Flint — something it has acknowledged only grudgingly.

On Monday, EPA Administrator Gina McCarthy insisted, “EPA did its job but clearly the outcome was not what anyone would have wanted.” But a day later, the agency said that “while EPA worked within the framework of the law to repeatedly and urgently communicate the steps the state needed to take to properly treat its water, those necessary (EPA) actions were not taken as quickly as they should have been.”

In other words, they screwed up — like just about every government agency involved in this public health disaster.