Flint will replace at least 18,000 lead or galvanized-steel water lines by 2020, and the state will pick up the bill with state and federal money, according to the settlement filed in federal court.
Crews have been replacing pipes for months in Flint, where residents still feel betrayed by a series of devastating decisions that caused the crisis.
Unfortunately, Flint, Michigan still doesn't have clean water.
According to the state's top law enforcement official who is now investigating the crisis, a $200-a-day water treatment would have prevented the lead leaching.
Scientist Marc Edwards, who first revealed Flint's high lead levels in 2015, said the current lead levels in Flint are not worse than many other older cities in the country.
The state of MI will provide Flint up to $87 million to upgrade water pipes and set up water bottle distribution centers so that residents can have clean drinking water under the terms of the settlement proposed on Monday.
Flint was under the control of a state-appointed emergency manager when it switched its water source to the Flint River from Lake Huron in April 2014.
A federal judge at the U.S. District Court for Michigan's eastern district approved the agreement Tuesday.
A spokeswoman for Michigan Gov. Rick Snyder (R) on Monday declined to comment, citing a judge's order limiting public comment on the case until he approves a settlement.
The state will also monitor the water quality of a sampling of homes after the replacement, and hire an independent third party to test and monitor a sampling of at least 100 homes for at least three years.
Concerned Pastors for Social Justice, the Natural Resources Defense Council, the Michigan ACLU and Flint resident Melissa Mays don't get the door-to-door delivery of bottled water they had been seeking in recent months.
The changes followed state officials' declarations that the water quality has improved, but city residents are still being advised not to drink the water unless it has been properly filtered. Many locals have reportedly been poisoned by the lead that has seeped into their water supply.
Replacement of pipes will be completed by January 2020, the agreement states.
The issues in Flint began when the town switched from the Detroit water system to the Flint River.
"They keep telling me the water is safe to use (with filters) ... but to me, if you still have to use filters, then the water isn't safe", she said. The state has handed out free water filters, which the city recommends residents use before drinking or cooking with Flint tap water.