JERSEY CITY — Anxious parents may wonder how a major school system like Newark’s could overlook lead in the drinking water of 30 schools and 17,000 students. The answer: It was easy. They had to look only a few miles away, at the century-old classrooms of the schools here, across the Hackensack River.

The Jersey City Public Schools district discovered lead contamination in eight schools’ drinking fountains in 2006, and in more schools in 2008, 2010 and 2012. But not until 2013 did officials finally chart a comprehensive attack on lead, which by then had struck all but six schools.

This winter’s crisis in Flint, Mich., has cast new attention on lead in water supplies. But problems with lead in school water supplies have dragged on for years — aggravated by ancient buildings and plumbing, prolonged by official neglect and tight budgets, and enabled by a gaping loophole in federal rules that largely exempts schools from responsibility for the purity of their water.

Children are at greatest risk from lead exposure, and school is where they spend much of their early lives. But cash-starved school administrators may see a choice between spending money on teachers or on plumbing as no choice at all.