It’s a debate that seems better suited to a pawn shop than to the scientific laboratory, but for years, astrophysicists have wondered: where did gold come from?

Many common elements in the universe, like carbon and iron, are forged in the fiery furnace of stars. But gold and other heavy elements require special conditions; they are formed by powerful, violent cosmic events. The question was just which ones.

Some researchers thought gold came from exploding stars called supernovas, while others thought that it might be produced when the remnants of supernovas, called neutron stars, slammed into one another and created gamma ray bursts—brief flashes of high-energy radiation.

Now, a recent gamma ray burst in a galaxy 3.9 billion light-years away has provided strong evidence that all the gold in the universe is a byproduct of dense neutron stars colliding. The burst, which was recorded by NASA’s Swift satellite in early June, was just a fraction of a second long, but it was close enough that scientists were able to detect the afterglow created by some of the heavy radioactive elements generated. Then, they could estimate how much gold was in the mix.

Edo Berger, a professor of astronomy at the Harvard-Smithsonian Center for Astrophysics who led the work, submitted to The Astrophysical Journal, said that based on the known frequency of two neutron stars slamming into one another and their estimate of how much gold created in the recent collision, researchers can now account for all the gold in the universe.

Berger said it will probably take a few more observations of gamma ray bursts to convince the scientific community that this is the key source of gold in the universe, but now that astronomers know what type of signature to look for, they may be able to detect the element on gamma ray bursts from more distant galaxies.