Michigan will stop providing free bottled water to the city of Flint, Gov. Rick Snyder said on Friday.

City officials criticized the decision, in part because Flint is still recovering from a crisis that left residents with dangerous levels of lead in their tap water beginning in 2014.

But Michigan officials said lead levels in the water there have not exceeded federal limits for about two years, so the state was closing the four remaining distribution centers where residents have been picking up cases of free water since January 2016.

“We have worked diligently to restore the water quality and the scientific data now proves the water system is stable and the need for bottled water has ended,” Mr. Snyder, a Republican, said in a statement on Friday.