More than mere beautiful, coveted stones, diamonds hold another sort of wealth: fragments of Earth's deep history.

From flaws within the mineral's near-perfect lattice, scientists have just worked out how to extract long-hidden records of our planet's past.

"We like the ones that no one else really wants," said geochemist Yaakov Weiss from Columbia University, referring to the diamonds full of impurities that don't look as clear and shiny as those desired for jewelry.

These fibrous, dirty-looking gems are where tiny vaults of information lie, stuffed with messages from Earth's inner depths. The carbon structure of a perfect diamond doesn't contain enough radioisotopes to help researchers date it, but the microinclusions found in its flaws can.

These flaws can form tiny pockets that may encapsulate the chemicals from which the diamonds birthed.

"After a diamond captures something, from that moment until millions of years later in my lab, that material stays the same," explained Weiss back in 2015. "We can look at diamonds as time capsules, as messengers from a place we have no other way of seeing."

Sometimes these capsules contain other solids like strange forms of ice, usually inaccessible minerals from the bowels of our world, or even another diamond. These solid messages can be hard to interpret, as the inclusions may have formed at different times from the diamond capsule within which they now rest.

Other cavities in the diamond's structure, however, have captured fluids that once infiltrated the continental lithospheric mantle. This layer of Earth is the uppermost part of the mantle (which lies between Earth's crust and outer core), 150 to 200 kilometers (90 to 120 miles) beneath the surface, and it's where diamonds are 'born'.

GettyImages 1227503317 1(Tumeggy/Science Photo Library/Getty Images)

Here, extreme heat and crushing pressures from all the rock above can force carbon atoms into the neatly ordered structure of a diamond. In fact, the fluids that have seeped from above provide the carbon from which the diamonds are formed.

Now a new technique has allowed the researchers to finally date those fluids within diamonds found in southern Africa.

"This is the first time we can get reliable ages for these fluids," said Weiss.

A diamond used in the study. (Yaakov Weiss)A diamond used in the study. (Yaakov Weiss)

A diamond's structure appears to prevent helium from leaking out, allowing Weiss and colleagues to age these rocks by measuring the ratios between radioactive atoms in the fluid inclusions and helium-4, a product of atoms' decay.

Using this new method, the team identified three distinct periods of diamond formation in the subterranean rock masses that eventually squished together to form the mantle of Africa. The diamond-forming fluids changed across the ages, going from rich in carbonate to silicone and, finally, to saline.

The first phase of diamond formation occurred during the Proterozoic, 2.6 billion to 750 million years ago, when these rocks collided into great mountain ranges. The researchers suspect these collisions allowed the carbonate-rich fluids to sink deep within Earth, but how exactly is still unknown.

The next phase also coincided with a mountain-forming period, 540 to 300 million years ago during the Paleozoic, producing diamonds with silicone-rich inclusions. By this stage, the beginnings of the African-mantle-to-be were forming.

Then, 130 to 85 million years ago during the Cretaceous, the fluid became saline rich – suggesting these diamonds were formed from what once was the ocean floor. This was dragged beneath the now-formed continental mass of Africa by subduction, where one continental plate is forced below another where they meet.

The stones were all then carried closer to Earth's surface through deep-reaching volcanic activity, such as the kimberlites eruptions 85 million years ago, where miners recently found them.

"Southern Africa is one of the best-studied places in the world, but we've very rarely been able to see beyond the indirect indications of what happened there in the past," said Columbia University geochemist Cornelia Class, explaining these minuscule drops of fluid are a rare way to link events from deep within Earth with those on the surface.

It's worth noting that today, millions of workers rely on diamond mining as a source of income, but the conditions they work within can be brutal and may include human trafficking and child labor. The mines have also polluted soils and waterways relied upon by entire communities.

The company from which the diamonds in this study were obtained, De Beers, one of the two largest diamond producers in the world, often doesn't disclose which mines individual diamonds come from.

So while diamonds can clearly reveal much about our geological history, their extraction from Earth can also come at an incredibly high price.

This research was published in Nature Communications.