DETROIT -- A judge on Tuesday ordered Flint, Michigan, to choose a long-term source of drinking water by next week, saying the City Council so far is showing a "breathtaking" lack of leadership.

Gov. Rick Snyder's administration sued Flint to force the council to approve a 30-year deal with the Great Lakes Water Authority, a regional water agency, which has been serving the city since a lead disaster was declared in fall 2015.

Mayor Karen Weaver agrees with the plan, but the council hasn't been persuaded and just recently hired a consultant. A court-appointed mediator has been unable to broker a settlement.

Get Breaking News Delivered to Your Inbox

U.S. District Judge David Lawson expressed frustration and started his 29-page decision with a quote by John F. Kennedy about the risks of "comfortable inaction."

"The failure of leadership, in light of past crises and manifold warnings related to the Flint water system, is breathtaking," Lawson said.

He set a Monday deadline for Flint to sign up with Great Lakes Water or come up with another long-term solution. He didn't indicate what would happen if the deadline is missed.

Flint ran into extraordinary trouble when managers appointed by Snyder put the city on water from the Flint River in 2014 while a pipeline was being built to Lake Huron. The corrosive water wasn't properly treated, and lead leached from old plumbing into homes of the roughly 100,000 residents.

The state and other public agencies want Flint to stay with Great Lakes Water for the next three decades and drop a plan to upgrade the water treatment plant and distribute water on its own. The state says a long-term deal will keep Flint's water fund solvent and alleviate the need to raise rates.