The city council of Flint, Michigan voted to extend its water contract with the Great Lakes Water Authority, rather than going with a 30-year contract Mayor Karen Weaver had negotiated. And the state is not happy.

Michigan’s Department of Environmental Quality (DEQ) filed a lawsuit in federal court against the city yesterday (June 28), alleging that this move will cause “imminent and substantial endangerment to public health in Flint,” per several local news reports. The department did warn the council it would take legal action if the city did not make a long-term decision by the deadline set earlier this week.

The city used to receive its water from the Great Lakes Water Authority, which provides water to Detroit, before the lead water crisis struck Flint in 2014. When the city switched to the Flint River without proper corrosion controls, lead leached into the water stream. Since Flint returned to the Detroit-area water system in 2015, it has extended the contract for several months at a time.

State officials, however, want to secure something long-term to avoid any further switches. Weaver said in April that she wanted the city to stay with Detroit’s Great Lakes Water Authority. “Despite proposing no other reasonable alternative, the Flint City Council has refused to approve the agreement negotiated by the mayor,” the lawsuit states, per The Detroit Free Press.

Ultimately, the state wants the courts to force the city into taking the $12.1 million-a-year contract. Otherwise, the city would be paying $21 million a year, reports The Detroit News. Though the mayor disagrees with the city council’s decision, Weaver also disagrees with the state’s decision to sue.

“While disappointing that the state and federal government are now involved in making a decision we as city leaders should be making for Flint, I cannot say that I am surprised,” she said in an online statement. ”We were notified that legal action would be a consequence of council choosing not to meet the requirements set before them to approve a long-term water source for Flint.”

As The Detroit Free Press notes, this suit’s allegations are a bit ironic given that Michigan Attorney General Bill Schuette has targeted the DEQ in his Flint investigation. Some current and former employees are facing felonies: two with involuntary manslaughter and others with willful neglect, misconduct in office and tampering with evidence, among others.