(Reuters) - Michigan’s finances could be pressured from additional costs related to the years-long lead-tainted water crisis in Flint even after a recent court-approved settlement, S&P Global Ratings said on Monday.

The Flint Water Plant tower is seen in Flint, Michigan, U.S. on February 7, 2016. REUTERS/Rebecca Cook/File Photo

A U.S. Court judge approved a deal on March 28 requiring the state to pay $87 million to identify and replace service lines in Flint containing lead or galvanized steel by 2020. An additional $10 million will be held in reserve.

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. The more corrosive river water caused lead to leach from pipes. Lead poisoning stunts children’s cognitive development, and no level of exposure is considered safe.

The water crisis prompted dozens of lawsuits and criminal charges against former government officials. The episode also raised questions of social justice in Flint, whose population is predominantly African-American.

S&P, which rates Michigan AA-minus with a stable outlook, said while the settlement costs are minimal compared with the state’s $56.3 billion budget, “additional unintended costs” lurk in the future.

“While related costs seem manageable for now, the agreement signifies that the state may be required to continue to support costs, the magnitude of which remains uncertain in the long term,” the credit rating agency said in a report, adding that “the economic and social costs, on top of the financial responsibility, will unfold over a long time.”

Additional costs related to the crisis could impede Michigan’s ability to boost its budget reserves, which stood at an “adequate” level of about $1.2 billion at the end of fiscal 2016, S&P said.

“Should the economy begin to contract as financial challenges related to the Flint water crisis and other assistance to local governments grow, we could see the reserves remaining stagnant or depleting over the long term, creating credit pressures for the state,” the report added.

Anna Heaton, a spokeswoman for Governor Rick Snyder, said all the money to cover the settlement has been identified from state and federal sources and there will be no future costs associated with the deal.

Flint switched back to the previous water system in October 2015. The U.S. Environmental Protection Agency last June declared filtered water safe to drink in Flint.

The settlement resulted from a lawsuit filed last year by the Natural Resources Defense Council and other groups against state and city officials.