Residents of a city in Michigan have filed a class action lawsuit - accusing the city and state of endangering their health by exposing them to dangerous levels of lead in their water.

The class action lawsuit challenges a decision taken last year to switch the city’s supply to water sourced from the Flint River rather than Detroit’s water system in an attempt to save money.

Residents complained of various health problems from using the local water, including respiratory disorders and skin lesions, despite officials' assurances that the water was safe, Reuters reported.

A federal lawsuit filed last week said the measure was taken after Governor Rick Snyder placed the city of about 99,000 people under emergency financial management.

Mr Snyder decided last month to switch Flint residents back to Detroit's water system. But the lawsuit said the damage had already been done, and that it would take time to fix pipes and service lines corroded by Flint River water.

“Defendants' conduct in exposing Flint residents to toxic water was so egregious and so outrageous that it shocks the conscience,” said the lawsuit.

“For more than 18 months, state and local government officials ignored irrefutable evidence that the water pumped from the Flint River exposed users to extreme toxicity.”

On Monday, the American Civil Liberties Union of Michigan and the nonprofit Natural Resources Defense Council said they also intend to sue if problems are not fixed.

“This action is about holding the government accountable for failing to protect the public health of an entire community,” said Anjali Waikar, an environmental justice staff attorney at the Natural Resources Defense Council.

“This case also highlights a troubling trend in which the government is willing to cut costs at the expense of its most vulnerable citizens.”

Michael Steinberg, legal director for the ACLU of Michigan, said: “In their short-sighted effort to save a buck, the leaders who were supposed to be protecting Flint’s citizens instead left them exposed to dangerously high levels of lead contamination.”

The crisis has had considerable fall-out. Earlier this week, the engineer in charge of the city’s water supply, Howard Croft, resigned from his position in order to regain public trust.

“It is with deep sadness that I tender my immediate resignation” as public works director,” he said in a letter.

“With the city engaged in transition and working to regain public trust, I believe that now is the right time for me to step down from this position.”

Sara Wurfel, a spokeswoman for Mr Snyder, the governor, said state officials have not yet been served with the lawsuit and could not comment on it.

“What we would say is that we're focused on moving forward and ensuring public health and clean, safe drinking water,” Ms Wurfel told the The Flint Journal-MLive.