The sewage being treated by your city could be a veritable gold mine. That's because all kinds of metals end up in sewage sludge, which is the leftovers from treated sewage, Science reports.

Researchers in Arizona recently found that a city of a million people could generate up to $13 million a year in such metals, with $2.6 million of that coming in the form of gold and silver.

They studied the samples, which came from 32 states, with a mass spectrometer, Discover reports; the tool uses extreme heat to reveal elements. On a global scale, they found, sludge probably contains about 360 tons of gold each year.

"While we expected that the metals were present at low concentration, the fact that the small amounts represent such a significant economic value was definitely surprising," a study co-author tells Time.

Getting at those metals might sound like a pipe dream, quite literally, but a city in Japan was able to get about four pounds of gold from every metric ton of ash from burned sludge.

That's better than what some mines can offer, Science notes. "We need to make this push where we stop thinking about (sewage sludge) as a liability and instead we think about it as a resource," says an outside researcher.

Unfortunately, there's not currently any technology to extract metals from sludge on a large-scale, but if we could someday find a way to do so, there could be environmental benefits, too: The metals in sludge, which is often used as fertilizer, may not be great for the environment, so removing them could be a good thing.

As for how metals get into wastewater? Industries like electronics, jewelry manufacturing, mining, and the like. (If searching through sludge is too much for you, you could always look for gold directly in the toilet.)

This article originally appeared on Newser: Your City's Sewage Could Hold $2.6M in Gold and Silver

More From Newser