Newark’s tap water is safe to drink — mostly — city and state officials said Monday as new tests showed that 97 percent of lead filters installed in the New Jersey city are doing their job.

Residents in more than 14,000 homes — particularly those within the Pequannock water treatment system — have been relying on bottled water since toxic levels of lead were found in the drinking supply in 2017.

Newark officials had previously handed out more than 38,000 lead filters to address the issue, but two of three filters tested last month showed levels of lead as high as 57.9 parts per billion — nearly four times the federal threshold of 15 parts per billion.

Over the past several weeks, filters in about 300 new homes were newly tested, and 97 percent passed, Mayor Ras Baraka and Gov. Phil Murphy announced at an afternoon press conference.

“We thank God that the filters work, but we are not in any way having a victory lap,” Baraka said. “It is good news in a long and arduous task to make sure we have clean drinking water.”

And the filters are just a temporary solution for the city, which has more than 18,000 aging lead pipes that aren’t due to be dug up for up to two years under a $120 million capital project. The full replacement of pipes is expected to take 8-10 years.

Residents who remain edgy about trusting their long-troubled water supply can still get free bottled water from the city, Baraka said.