Earthquakes turn water into gold as pressure causes the sudden vaporization of water, forcing gold onto the quake’s fault lines. In the new study, published in Nature Geoscience, scientists created a model that tested the hypothesis that earthquakes are responsible for gold deposits.

The study, led by Dion Weatherley, from the University of Queensland in Australia, and Richard W. Henley, from the Australian National University in Canberra, states that gold is typically found in quartz veins. These veins could have been formed nearly 3 billion years ago as mountains rose from the grounds. Along ancient active fault lines, earthquakes created tremendous fluctuations of pressure leading to the creation of gold.

Earthquakes occur along fault lines. In these fault lines, there are fractures and other empty spaces that are filled with water. According to Live Science, water found in these fault lines, approximately 6 miles below the Earth’s surface, acts as a sort of lubricant and contains silica, carbon dioxide and gold.

As the earthquake travels along these fault lines, water is trapped in jogs. These jogs are areas of tension, and the water trapped in these jogs are placed under high pressure. The jog’s cavity expands, reducing the pressure at an extreme rate. This rapid reduction of pressure causes the water to vaporize, leaving the silica and other minerals on the rock’s surface.

Previously, scientists believed that gold was deposited over time along fault lines or when pressure changes caused fluids, such as water, to be pushed up into fault lines or other underground cavities, Live Science reports. According to the study, “Multiple earthquakes progressively build economic-grade gold deposits.” One earthquake will not leave enough gold that could be mined, but, over time, an active fault line could lead to a gold deposit that could be minded. It would take around 100,000 years of seismic activity along an active fault line to produce a sizable gold deposit, Live Science notes.

Volcanoes are another source of gold, although the process is much different than an earthquake’s, Live Science reports.