The formation of a planetary system is a somewhat messy affair.

After a star has finished forming, the swirling, roiling disk of material left over from the process starts to clump together, forming the seeds of planets. The complex gravitational environment is not a kind one, however, and these bodies jostle and collide as they continue to grow and migrate within their systems.

Now astronomers have found evidence of just such a collision in a young system, 95 light-years from Earth. According to their analysis, the unusual dust around the young, 23 million-year-old star HD 172555 is the result of a planetary impact so violent that it at least partially stripped one of the bodies of its atmosphere.

"This is the first time we've detected this phenomenon, of a stripped protoplanetary atmosphere in a giant impact," said astronomer Tajana Schneiderman of MIT.

"Everyone is interested in observing a giant impact because we expect them to be common, but we don't have evidence in a lot of systems for it. Now we have additional insight into these dynamics."

The planetary formation process is a complicated one, and we've had to cobble together what we know from our own fully formed system, and other systems in the Milky Way galaxy that we've seen at various stages of development.

When a star forms from a clump of dust and gas in a molecular cloud, a vast disk of material forms, feeding into the growing star.

This disk undergoes a transformation, possibly commencing before the star has even finished forming, as specks and fragments within it start to cling together, first electrostatically, and then, as the body accumulates mass, gravitationally.

These larger and larger clumps collide and merge, eventually gaining enough mass for a differentiated core to settle in the center, and finally becoming a planet.

Not every baby planet survives, though. We think one such Mars-sized planet that didn't make it in the Solar System collided with Earth to create the Moon, for instance.

Astronomers think that most planets don't form where they ultimately end up, either; instead, they form elsewhere and migrate to their final position. These movements would cause additional perturbations that could result in smash-ups.

These collisions are therefore thought to be quite a common occurrence during the formation of a planetary system. Indeed, they seem to play an important role in the way planets grow, and the ultimate architecture of that system.

HD 172555 has long been thought a bit of an oddball. The dust swirling around it has an unusual composition and grain size: an unusual amount of silica and solid silicon monoxide, and much smaller dust grains than average.

This had previously been interpreted as the result of a hypervelocity impact, so Schneiderman and her colleagues decided to take a closer look at the carbon monoxide around the star.

"When people want to study gas in debris disks, carbon monoxide is typically the brightest, and thus the easiest to find," Schneiderman said. "So, we looked at the carbon monoxide data for HD 172555 again because it was an interesting system."

They found that there was rather a lot of carbon monoxide, orbiting the star at an unusually close distance of 10 astronomical units. At this distance, the gas should have been broken down by stellar radiation, which meant an explanation was warranted.

The best fit for the observations, according to the team's modelling, was a giant impact. They were even able to narrow down when and how it happened. At least 200,000 years ago – recent enough that the carbon monoxide would not have had time to have broken down – an Earth-sized rocky planet was smacked by a smaller body at a velocity of 10 kilometers per second (over 22,000 miles per hour).

This impact would have been so violent that it blew off at least part of the rocky planet's atmosphere. This would explain the carbon monoxide and the silica-rich dust.

"Of all the scenarios, it's the only one that can explain all the features of the data," Schneiderman said.

"In systems of this age, we expect there to be giant impacts, and we expect giant impacts to be really quite common. The timescales work out, the age works out, and the morphological and compositional constraints work out. The only plausible process that could produce carbon monoxide in this system in this context is a giant impact."

The results give us new tools for identifying when giant impacts have taken place. If we find large amounts of carbon monoxide where it shouldn't be around a star, that could be a sign that things have gotten messy during the formation of a planetary system.

We can then study this gas and other debris, not just to learn more about the aftermaths of such collisions, but to understand what planets in other systems are made of – a sort of cosmic haruspicy that could lead us to a better understanding of how planets are born.

The research has been published in Nature.