Earth is not one to sit still. For roughly 3 billion years, our planet has been perpetually recycling its ocean floor, swallowing up old oceanic crust in some areas and pouring out new seabed in others. Diamonds, it would seem, are the beautiful byproducts of all this restlessness.

Tipped off by tiny traces of trapped salt, researchers have now shown that most diamonds are crystals of submerged carbon, created from recycled seabed crusts cooked deep underground.

"There was a theory that the salts trapped inside diamonds came from marine seawater, but couldn't be tested," says lead author Michael Förster from the Technische Universität Berlin.

"Our research showed that they came from marine sediment."

The word 'diamond' is derived from the Greek term 'adamas', which means 'unconquerable'. The name is a reference to the material's hardness, but it could just as easily describe the gemstone's birthplace.

Apart from the ones that have arrived here from space, most diamonds are formed in very old parts of Earth's mantle, a layer that makes up over 80 percent of the planet's total volume and yet has never been visited by humankind.

By comparison, the thin slice of crust we currently live on makes up only one percent of the planet's volume. But that crust is still some 35 kilometres deep, so it's been tricky for us to study Earth's mantle directly.

Just this week, a decade-long drilling mission to observe these mysterious depths was shut down after "a continuous six-month nightmare" in which the hole kept collapsing.

Without access to the mantle, the true formation of diamonds has remained an unanswered question for many years. An international team of geoscientists, led by researchers at Macquarie University in Australia, have now made an effort to settle the debate from the comfort of Earth's surface.

By recreating the extreme pressures and temperatures found 200 kilometres (124 miles) underground, the team has demonstrated that seawater in ocean floor sediment can absolutely produce the balance of salty fluids commonly found in diamond.

Today, most diamonds we see in shops or on fingers appear crystal clear, and are valued for this quality. But 'fibrous diamonds' also exist - these form so quickly, they accidentally trap traces of sodium, potassium, and other minerals. These inclusions give them a cloudy appearance, but that impurity also allows us a clear window into their past.

The team tested the formation of salty diamonds by placing marine sediment samples inside a sealed vessel, along with a common type of mantle rock called peridotite. Turning up the pressure and heat, they tested how different conditions in parts of the mantle might affect these salty fluids.

The most diamond-like balance of sodium and potassium occurred at temperatures between 800°C and 1,100°C, pressures between four and six gigapascals, and depths between 120 and 180 kilometres below Earth's surface.

"If 'most diamonds were created equal', then it would follow that the reaction between sedimentary rocks and peridotite during subduction is a main mechanism for the formation of lithospheric diamonds and mantle carbonates," the authors conclude.

For diamonds like this to form, they explain, conditions have to be just so. A large slab of sea floor, for instance, would have to slip down more than 200 kilometres; this tectonic sliding, known as subduction, would have to occur quite rapidly.

Before this giant slab arrives at the 800°C upper mantle and begins to melt, it must compress by more than 40,000 times our planet's atmospheric pressure. Otherwise, no diamond is born.

During this process, salty fluids from ancient marine environments are also slipping down into the lower mantle and interacting with peridotites, producing chlorides as a result. Later, these melt and form diamond-bearing volcanic rocks called kimberlites, which eventually erupt onto Earth's surface for us to find and cherish.

"We demonstrated that the processes that lead to diamond growth are driven by the recycling of oceanic sediments in subduction zones," says Förster.

In other words, that diamond in your jewellery box has seen more of the planet than we humans could ever hope. It is, in essence, hundreds of millions of years of deep-sea history, compressed into a tiny, beautiful gem.

The research is published in Science Advances.