In the decision on Thursday, the justices similarly debated whether a traveler could be said to have simultaneously come from the train station, Baltimore and Europe and whether a recipe calling for adding drippings from meat to gravy made sense when the drippings were collected from a pan.

Justice Stephen G. Breyer, writing for the majority, rejected both sides’ positions in the case as too extreme. The county and the Trump administration had argued that discharges into groundwater were never covered, while environmental groups suing the county said the law applied to discharges that “actually and foreseeably reach navigable surface waters.”

The United States Court of Appeals for the Ninth Circuit, in San Francisco, ruled for the environmental groups, saying the law applied because pollution in the ocean was “fairly traceable” to the wells.

That standard was too broad, Justice Breyer wrote. “Virtually all water, polluted or not, eventually makes its way to navigable water,” he wrote. The question courts should ask, he wrote, was whether “the addition of the pollutants through groundwater is the functional equivalent of a direct discharge from the point source into navigable waters.”

The Ninth Circuit’s approach, he wrote, “would require a permit in surprising, even bizarre, circumstances, such as for pollutants carried to navigable waters on a bird’s feathers, or, to mention more mundane instances, the 100-year migration of pollutants through 250 miles of groundwater to a river.”

But the opposite extreme, as argued by the county and the administration, would allow polluters to evade the law, Justice Breyer wrote. “Why could not the pipe’s owner, seeking to avoid the permit requirement, simply move the pipe back, perhaps only a few yards, so that the pollution must travel through at least some groundwater before reaching the sea?” he asked.

In requiring “the functional equivalent of a direct discharge,” Justice Breyer listed several factors for courts to consider. “Time and distance are obviously important,” he wrote, but he listed five other considerations, too, including the material through which the pollutants travel and whether they are diluted or chemically altered along the way.