JACKSON, Miss. (AP) — After nearly two months of being forced to boil their water before drinking it or using it to brush teeth, people in Mississippi’s largest city were told Thursday that water from the tap is safe to consume — but Jackson’s water system still needs big repairs that the mayor says the cash-strapped city cannot afford on its own.

Gov. Tate Reeves and Jackson officials said in separate announcements that the state health department lifted a boil-water notice that had been in place nearly seven weeks in the city of 150,000.

“We have restored clean water to the city of Jackson ,” Reeves said during a news conference.

But a state health department official, Jim Craig, said households with pregnant women or young children should take precautions because of lead levels previously found in some homes on the Jackson water system. Craig said although recent testing showed “no lead or lead below the action levels” set by the EPA, people should continue to avoid using city water to prepare baby formula.

Emergency repairs are still underway after problems at Jackson’s main water treatment plant caused most customers to lose service for several days in late August and early September.

Reeves said the water system remains “imperfect.”

“It is possible, although I pray not inevitable, that there will be further interruptions,” Reeves said. “We cannot perfectly predict what may go wrong with such a broken system in the future.”

Problems started days after torrential rain fell in central Mississippi, altering the quality of the raw water entering Jackson’s treatment plants. That slowed the treatment process, depleted supplies in water tanks and caused a precipitous drop in pressure.

When water pressure drops, there’s a possibility that untreated groundwater can enter the water system through cracked pipes, so customers are told to boil water to kill potentially harmful bacteria.

But even before the rainfall, officials said some water pumps had failed and a treatment plant was using backup pumps. Jackson had already been under a boil-water notice for a month because the state health department had found cloudy water that could make people ill.

The National Guard and volunteer groups have distributed millions of bottles of drinking water in Jackson since late August.

Jackson is the largest city in one of the poorest states in the U.S. The city has a shrinking tax base that resulted from white flight, which began about a decade after public schools were integrated in 1970. Jackson’s population is more than 80% Black, and about 25% of its residents live in poverty.

Like many American cities, Jackson struggles with aging infrastructure with water lines that crack or collapse. Mayor Chokwe Antar Lumumba, a Democrat in a Republican-led state, said the city’s water problems come from decades of deferred maintenance.

Some equipment froze at Jackson’s main water treatment plant during a cold snap in early 2020, leaving thousands of customers with dangerously low water pressure or no water at all. The National Guard helped distribute drinking water. People gathered water in buckets to flush toilets. Similar problems happened on a smaller scale earlier this year.

Jackson frequently has boil-water notices because of loss of pressure or other problems that can contaminate the water. Some of the mandates are in place for only a few days, while others last weeks. Some only affect specific neighborhoods, usually because of broken pipes in the area. Others affect all customers on the water system.

In 2016, the state health department found an inadequate application of water treatment chemicals because of a failing corrosion control system at the Curtis plant. The EPA required the city to correct this problem. In 2017, the city began installation of corrosion control treatment.

water quality notice published in July said the majority of tested samples showed lead levels “below the action level set by the EPA.” But it also listed precautions from the state Health Department, including that baby formula should be made only with filtered or bottled water and that children younger than 5 should have lead screening and blood testing.