The state of Michigan has sued the city of Flint for its refusal to approve a long term deal to buy water from a Detroit-area system.

The Department of Environmental Quality threatened legal action if the council did not approve Mayor Karen Weaver’s recommendation to achieve a reasonable alternative by June 26, 2017. The lawsuit states that Flint City Council’s failure to meet Monday’s deadline on picking a water source will “cause an imminent and substantial endangerment to public health in Flint.”

Officials in Michigan do not want Flint to change water sources for a third time after 2014’s switch resulted in lead contamination of the city. The lawsuit seeks to stop Flint from switching water sources and sign a 30-year contract to remain in compliance with drinking water laws.

Councilwoman Kate Fields noted that trying to rush a plan was premature.

“June 26 is an arbitrary date imposed by the MDEQ. It's not like they're going to cut off our water. As long as we have access to safe, treated water, we're in no danger if we do not approve this contract," Fields said.

In a letter addressed to City Council, President Nelson and Flint Mayor Karen Weaver, director of the Department of Environmental Quality Heidi Grether said the city’s failure to make a decision by the deadline would force the state to take legal action to ensure the safety of Flint’s drinking water source.

The City Council ignored the state’s deadline and a June 15 letter threatening imminent legal action. Instead of selecting a permanent water source, the city council approved a three-month extension of its contract with a Detroit water source.

City Council President Kerry Nelson said the state’s deadline was too soon for council members to vet a new water deal like the mayor did. “We have to remember that the governor caused this problem,” Nelson said.

Flint is currently paying $14.1 million a year to get its water from Great Lakes authority line. The city of Flint was going to join the Karegnondi Water Authority but the updates and repairs needed to the Flint water treatment plant would take three and a half to complete, Detroit News reports.

Under Mayor Karen Weaver’s plan, the city of Flint would stay with the Detroit water system and use the local county as a backup. This plan would save the city $58 million and update the city’s failing distribution system.