Scientists have shown that the Earth's surface became enriched with precious metals by impacting meteorites.
The Earth's crust and mantle has considerably more gold than expected from favoured models of planetary formation.
A study from the University of Bristol looked at some of the oldest rocks on Earth, demonstrating that gold was delivered by meteorites long after their formation.
Their results are published in Nature.
While the Earth was forming, iron sank to the centre of the planet, forming the core.
Any precious metals in the planetary mix would have gone with this iron and concentrated in the core, leaving the mantle devoid of elements such as gold, platinum, and osmium.
But this is not what we observe. In fact, the silicate mantle has up to 1,000 times more gold than anticipated.
Several reasons for this enrichment were proposed in the past, including delivery by meteorites, although until now it has not been possible to prove.
By measuring isotopes in rocks that are nearly four billion years old from Greenland, the team has managed to date the gold delivery, and to relate it to an event known as the "terminal bombardment".
Earth formed by a snowball-effect known as accretion 4.55 billion years ago. The iron core with its accompanying mixture of precious metals formed very soon after that, within just a few million years.
A final impact of a Mars sized body with the Earth formed the Moon and finalised our planet's formation. By this time all gold would be locked up in the core.
A final burst of meteorite impacts around 3.9 billion years ago is known as the "terminal bombardment" and caused the cratering that we still see on the Moon.
It was during this last impact event that the gold which we can access in the crust was delivered.
"The proportions of gold and other precious metals are difficult to measure because they concentrate into nuggets, and we need to analyse a lot of rocks to get meaningful data." said lead researcher Dr Matthias Willbold.
They have therefore developed a way of telling this remarkable story of gold's extraterrestrial origin using a completely different element - tungsten.
Tungsten acts very similarly to precious metals like gold, but importantly it comes in different forms, or isotopes.The team have looked at the proportions of the different isotopes in modern rocks and in the most ancient rocks in Greenland.
They found a small but significant difference in the proportions, indicating that the modern rocks had received a dose of tungsten, and therefore also gold, from meteorites.
The Greenland rocks showed no such enrichment, giving a date to the input of gold. This date corresponds to the time of the terminal bombardment around 3.9 billion years ago.
During this time, the Earth would have been hit with 20 billion billion tonnes of asteroid material, although "it is not clear whether this would have come in the form of many small impacts, or just two or three mega-impacts", Dr Willbold said.
The research group at the University of Bristol are the first to successfully make such high-quality measurements of tungsten in ancient rocks, but so far have only analysed samples from Greenland.
"We hope to find more," said Dr Willbold, "and look at a time sequence for one billion years after the Greenland rocks, to see how the tungsten anomaly develops."