DETROIT — The state of Michigan has reached a settlement agreement to pay $600 million to victims of the debacle that exposed tens of thousands of residents to lead-contaminated drinking water for nearly two years, a person close to the negotiations confirmed late Wednesday.

The settlement, which will be announced Friday, will award the most money to the city’s youngest children, who were at greatest risk for lead poisoning and the physical damage and neurological problems that can cause.

The water crisis, which began in 2014 when this economically distressed city changed the source of its municipal water supply to save money, became one of the nation’s worst public health disasters in decades.

According to the settlement, which was reviewed by The Washington Post, 80 percent of the monetary award will go to residents who were younger than 18 at the time of their exposure. More than half of that amount will go toward children who were younger than 6.

Between 18,000 and 20,000 children and adolescents lived in Flint during the water crisis, officials have estimated.

The remaining 20 percent of the settlement will go to plaintiffs whose lawsuits pertained to other issues, such as property damage and loss of revenue.

Plaintiffs’ lawyers reached an agreement with the state’s lawyers on behalf of Gov. Gretchen Whitmer (D) last week. Whitmer is expected to announce the full details.

The resolution follows 18 months of negotiations involving attorneys acting on behalf of Flint residents and businesses, and court-appointed mediators overseen by U.S. District Judge Judith E. Levy. Talks escalated greatly in recent months amid the coronavirus pandemic.

The settlement encompasses multiple lawsuits and cases filed against the state. It also will cover claims by residents who contracted Legionnaires’ disease because of their exposure. The deadly form of pneumonia spread through the city during the crisis and became one of the largest outbreaks of the disease in U.S. history. At least 90 people fell ill and 12 died — though one investigation concluded that the toll might have been far higher.

Including those sickened by Legionnaires’ in the deal represents a dramatic shift in tone by the state. In the months and years since the outbreak was revealed to the public, experts concluded that it was a direct result of the switch in water supply. But state health officials maintained that any link could not be proven.

Other claims against individual public officials, including former governor Rick Snyder (R), and private companies will still move forward.

Mayor Sheldon Neeley declined to comment Wednesday night on the details of the agreement.

The crisis began in April 2014 when Flint stopped drawing its water from Lake Huron and switched to the Flint River. But state officials failed to ensure that corrosion-control treatments were added to the new water supply. Without them, rust, iron and lead leached from the city’s aging pipes and contaminated the drinking water of homes and businesses.

Residents began complaining of discolored and foul-smelling water and then worse — with skin rashes after bathing — but their concerns were largely ignored by public officials.

Ampng some children tested in 2015 at a local hospital, the percentage with lead poisoning doubled after the switch in water sources. In some neighborhoods, it tripled. Rather than prompting immediate action, the test results were questioned and the pediatrician who tried to highlight them was harshly criticized.

When the city and state finally responded, forced in part by the federal Environmental Protection Agency invoking its emergency powers, a massive effort began to distribute bottled water and water filters throughout Flint. Snyder told residents in a State of the State address that “government failed you at the federal, state and local level.”

Though officials have declared the crisis over and Flint’s drinking water no longer a health hazard, residents say they have little trust in what comes out of their taps. Most continue to use bottled water.

A criminal investigation by the Michigan attorney general’s office continues. Felony charges initially were filed against more than half a dozen local and state officials, but last year those were dismissed and the probe restarted.