A US judge has approved a $626m (£467m) settlement for victims of the 2014-15 lead water crisis in Flint, Michigan.
Most of the money will go to the city’s children exposed to drinking poisoned water, affected adults, business owners and anyone who paid water bills.
At least 12 people died after Flint switched its water supply to the Flint river in 2014 without treating the corrosive water to save money.
As a result, lead in some old pipes broke off and flowed through taps.
An outbreak of Legionnaires’ disease followed, and nearly 100,000 residents were left without safe tap water.
Thousands of city residents later filed lawsuits against the state of Michigan.
“The settlement reached here is a remarkable achievement for many reasons,” District Judge Judith Levy said on Wednesday.
She added that the deal “sets forth a comprehensive compensation programme and timeline that is consistent for every qualifying participant”.
Most of the settlement will be paid by the state of Michigan, which was accused of repeatedly overlooking the public health risks.
Last year, prosecutors dropped all criminal charges against officials awaiting trial over the crisis, saying a more thorough investigation was needed.
Flint is a majority African-American city, where more than 40% of the residents live in poverty.
In 2014, Flint switched its water supply away from Detroit’s system, which draws from Lake Huron, and instead used water from the Flint river.
Flint was in a financial state of emergency and the switch was meant to save the city millions of dollars.
But the water from the river was more corrosive than Lake Huron’s water and was not treated properly, causing lead – a powerful neurotoxin – to leach from the pipes.
Residents started noticing that tap water sometimes came out blue or yellow – and many began to lose their hair, or develop rashes on their arms and face.
Despite this, local officials and leaders denied anything was wrong for over a year, even as residents complained that the water tasted and looked strange.
The city has since switched back to using Detroit’s water system.
However, many local residents still rely on bottled water for drinking, cooking and washing, saying they no longer trust the government.
This video can not be played
One in three children ‘exposed to lead’ globally
Flint: Life in a poisoned city
Flint water crisis: Michigan ‘agrees to pay $600m’