The phrase “There’s gold in them thar hills,” sometimes misattributed to a Mark Twain character, refers to the heady days of the Californian gold rush. Those days of panning for gold are over—but perhaps they shouldn’t be.

Researchers from Arizona State University analyzed sewage sludge—the stuff left behind after treating raw sewage—with a mass spectrometer, and found that a city of a million people gives out $13 million worth of metal annually—and $2.6 million of it is silver and gold.

The study’s lead environmental engineer, Paul Westerhoff, told Science that the sewage treatment systems that collect and try to dispose of the waste could be losing a lot of  precious cargo in the process, citing a city in Japan that collected nearly two kilograms of gold in every metric ton of ash after burning sludge.

Where does all this gold come from? Speculation is that it finds its way into our sewage through the processes of manufacturing, such as mining, electroplating, and the manufacture of jewelry. It should be no surprise that there are items of value in the sewers—workers in Modesto, California, were once investigated for selling wedding rings and other items of jewelry that had been flushed down the toilet.

Of course, the study didn’t account for one thing: whether the cost of extracting these precious metals from the sludge is actually worth it. Westerhoff says looking at this will be the next step, though he has a hypothesis. “We think it is,” he said.