Bacteria with the ability to change ions into solid gold? This scenario may sound like a biochemist’s version of a fairy tale, but it’s real and scientists at McMaster University have just described how the process works in a recent article published online in the journal Nature Chemical Biology.

The bacteria is called Delftia acidovorans, and it turns out that its King Midas-like conversion is part of a self-defense mechanism. Gold ions dissolved in water are toxic, so when the bacteria senses them it releases a protein called delftibactin A. The protein acts as a shield for the bacteria and changes the poisonous ions into harmless particles that accumulate outside the cells.

Although the amount of gold that Delftia acidovorans release is tiny (the particles are 25-50 nanometers across) it’s possible that the bacteria or the protein could someday be used to dissolve gold from water or to help people identify streams and rivers carrying the mineral.

For all the latest science news, check out our twice-weekly news rundown, Earth Current.