Michigan’s Department of Environmental Quality sued Flint officials in federal court on Wednesday, arguing that the City Council has endangered the public health by failing to approve a long-term drinking water source.

The state’s lawsuit in U.S. District Court in Detroit said Flint council’s failure to meet a Monday deadline on picking the Great Lakes Water Authority or another “reasonable” source “will cause an imminent and substantial endangerment to public health in Flint.”

At its Monday meeting, the City Council ignored the state’s deadline and a June 15 letter warning of imminent legal action. It instead approved a three-month extension of its contract with the Detroit area authority as some council members vowed to find an alternative water source.

The lawsuit comes 15 months after a task force appointed by Gov. Rick Snyder accused the Republican administration and others in state government of “failure, intransigence, unpreparedness, delay, inaction and environmental injustice” in the contamination of Flint’s water supply.

The lawsuit asks that the court “declare the City Council’s inaction will result in a violation of applicable” state and federal Safe Drinking Water laws and compel elected officials to enter into a 30-year agreement with the Great Lakes authority that Flint Mayor Karen Weaver had negotiated.

The Great Lakes authority deal also makes more financial sense for Flint because it would cost $12.1 million a year compared with the $21 million the city otherwise would annually be required to pay, according to the state’s filing.

“There is simply no other option that will adequately protect the public health in Flint,” according to the lawsuit.

A spokesman for the Weaver administration said the city has received the lawsuit and is reviewing it. Weaver is in New Orleans preparing to give a speech at a water conference and has not yet read the lawsuit, the spokesman said.

The Detroit area authority supplied the city for decades until concern over rising costs prompted the city to switch to Flint River water in April 2014, which resulted in lead contamination of the drinking supply when the water wasn’t properly treated with corrosion controls. After the state DEQ finally acknowledged the existence of the contamination, Gov. Rick Snyder’s administration forced the city back on the Great Lakes authority’s water in October 2015.

 Weaver recommended signing the 30-year contract with the Great Lakes authority as the best way to improve public health and save money from repairs that otherwise would have to be made at the city’s shuttered water treatment plant.

But City Council President Kerry Nelson said Tuesday that the state’s June 26 deadline was too rushed for council members, who needed months, not weeks, to vet the deal just like the mayor and others did.

“We have to remember that the governor caused this problem,” Nelson said.

Michigan Department of Environmental Quality Director Heidi Grether sent a June 15 letter to Weaver and Nelson saying failure to make a decision by Monday’s deadline would force the state to “take legal action against the city to ensure that Flint maintain a safe and reliable drinking source.”

Despite the insistence of some Flint council members, Grether indicated in her letter that Flint has almost no viable options outside of the Great Lakes authority agreement.

Flint is paying $14.1 million a year to get its water from a Great Lakes authority line that has been transferred to Genesee County, she said. Flint’s decision to transfer that line means Flint will lose use of the line on Oct. 1 – unless City Council approves the mayor’s deal with the Detroit area authority, Grether said in the letter.

Any alternative source would require extensive testing and the approval of the U.S. Environmental Protection Agency and would take years to put in place, she said.

The city was poised to join the Karegnondi Water Authority, but the extensive updates and repairs that would need to be made to the Flint water treatment plant would take three and a half years to complete, Grether wrote. The cost would be $58.8 million to $67.9 million, she said.

“Flint does not have the technical, financial, and managerial capacity available to ensure that use of any other water source will adequately protect the public health,” according to the state’s lawsuit.

As a result, switching to a source other than the Detroit area authority would violate an order the EPA issued to both the state DEQ and Flint on Jan. 26, 2016, the state argues.