Tiny fragments of magnetic particles trapped in the core of asteroids have provided scientists vital clues to the process of formation of our planet and also to its eventual death, according to a study published Wednesday in the journal Nature.

Asteroids, which are fragments of planets that failed to form during the infancy of our solar system, contain an iron-rich core. Scientists believe that over hundreds of millions of years, this core, which was initially surrounded by hot, liquid metal, eventually froze. As a result of this process, the asteroid’s magnetic field -- produced by the rotation of the liquid outer core around the solid inner core -- died out in the course of time.

Researchers used a giant X-ray microscope called synchrotron to study meteorites, which are fragments of asteroids that struck earth over millions of years. They found that the meteorites -- composed of iron and nickel -- contained within them microscopic crystals of a magnetic mineral known as tetrataenite that acted as a “hard drive,” retaining a memory of the birth and death of the asteroid's core as well as its magnetic field.

“It’s funny that we study other bodies in order to learn more about the Earth,” James Bryson, the paper's lead author, said in a statement. “Since asteroids are much smaller than Earth, they cooled much more quickly, so these processes occur on a shorter timescales, enabling us to study the whole process of core solidification.”

Scientists found that the asteroid’s magnetic field lasted for hundreds of millions of years after the asteroid formed and its core froze. This measurement of the cooling rate of the core and the time of its solidification would help scientists answer questions about the formation of Earth’s magnetic field and when the planet's core would die -- a process that would likely take billions of years.

“We believe that Earth's magnetic field is linked to core solidification … By studying an asteroid we get to see this in fast forward. We can see the start of core solidification in the magnetic records as well as its end, and start to think about how these processes work on Earth,” Richard Harrison from the University of Cambridge and the study's lead researcher, told BBC.