(CNN) A federal judge has ordered that Michigan and Flint officials must deliver bottled water to any Flint home where the government hasn't verified that a filter is properly working -- the latest ruling in a longstanding crisis over lead-tainted water in the city.

Thursday's ruling is a victory for plaintiffs who wanted government to do more than make bottled water and tap-water filters available at distribution points.

District Court Judge David Lawson ruled that unless government can certify that a Flint home has a well-installed and maintained water filter, or unless a household declines service, officials must deliver at least 96 half-liter bottles of water per resident to each household every week, until the court says otherwise.

Lawson ordered government to show him how it is complying with his order by December 16.

"Judge Lawson's wise ruling ensures that all Flint residents finally will have access to a reliable supply of safe drinking water until the lead pipes are replaced," said Michael J. Steinberg, legal director of the American Civil Liberties Union of Michigan.

The city "will do everything we can to abide by the order, including reaching out to leaders at the state level for help," Flint Mayor Karen Weaver said.

"We appreciate the judge's order and agree that clean water should be easily accessible to everyone in the city of Flint and more needs to be done to make that happen," she said in a news release.

Some filters installed incorrectly

Exactly how many of the city's roughly 34,000 households would receive water-delivery service isn't clear.

The state already hands out free water filters and bottled water at distribution points across the city. A leader of the state's handout effort testified that at least 90% of the households on the city's water system have the filters, which the city recommends residents use before drinking or cooking with Flint tap water.

But a filter's presence in a home doesn't necessarily mean it's working. The leader of a nonprofit group that helps residents install them testified that the process is difficult, and that as many as 52% of the more than 400 homes that the group visited has some type of problem with the filters, court documents read.

One of the plaintiffs, Flint resident Melissa Mays , said Friday that government currently does not check the filters' installation.

"One of the things we discovered is some people don't have cartridges in the filter," rendering them ineffective, Mays said. "And some of the models don't show when the filter is (expired)."

'Exciting' ruling

Mays' family is not using a filter, in part because of guidance that she's received that the filters aren't sufficient for people with certain health challenges. At least one of her sons is immunocompromised, and she has an autoimmune disorder, she said.

So her family relies on bottled water, and Lawson's order will be a relief, she said.

She and her husband have had trouble picking up the water before the distribution points close; he has had to use his lunch break, she said.

JUST WATCHED Melissa Mays in January: Flint water is 'poison' Replay More Videos ... MUST WATCH Melissa Mays in January: Flint water is 'poison' 01:31

Still others in the city don't have reliable transportation, she said. She said she recently saw a man discard a couple of cases of water because he was too frail to carry them onto a bus.

"Now the state and city can hire local people ... to go and take care of their neighbors. That's exciting," she said.

The Flint government argued that door-to-door water delivery and filter service would be cost prohibitive and force it to "reallocate other personnel and money away from" restoring its water system, court documents say.

But "Flint's monetary concerns, although valid, are not enough to tip the scale in their favor in light of the physical harm that flint residents have been exposed to," Lawson wrote in his ruling.

"And even if it did delay the process, it is in the public interest to address the immediate health and safety needs of residents before addressing the long-term needs," Lawson wrote.

What is the crisis?

Two years ago, in a move to save money, the state switched Flint's water supply from Lake Huron to the Flint River, a tributary notorious for its filth. The Department of Environmental Quality failed to treat the corrosive water, which ate into the city's iron and lead pipes, causing lead to leach into the drinking water.

Last year, researchers and medical personnel discovered high levels of lead in Flint residents, especially children. Lead has been tied to a host of medical problems, especially in the nervous system.

People experienced rashes and hair loss last year when high levels of lead were found in the local water supply.

The city switched back to the Lake Huron water supply in October 2015. In January, the governor declared a state of emergency, one month after the city's mayor did.

Lead-tainted pipes at 295 homes have been replaced so far, and the mayor hopes to have new lines installed at 700 more homes by year's end, the city's website says.

"While the level of lead in Flint's water supply has been substantially reduced since the city switched back a year ago to water delivered from Lake Huron by the Great Lakes Water Authority, residents are still being urged to drink only filtered water, and to replace their filters when needed," the website says.

Charity organizations also have helped , establishing additional distribution points where people can drive through and pick up bottled water, and by handing out water door to door.

Nine current and former state and local officials face counts ranging from willful neglect of duty to conspiracy over allegations they withheld information from the public about lead contamination in the city's drinking water.