An artist’s impression of a perturbation of stars in the Milky Way galaxyESA

Nearly 1 million miles away from Earth, a top-hat-shaped spacecraft called Gaia has spent the past five years scanning the galaxy and studying its stellar inhabitants. In April, Gaia produced the best census of the stars in the Milky Way galaxy to date, a cornucopia of precise information about nearly 1.7 billion stars in our galaxy. The previous census, released in 2016, contained data on just 2 million stars.

The census itself was a tremendous achievement, but there were many more potential discoveries hidden in the lining. Gaia had measured the brightness of nearly every star in the catalog, the surface temperature of about 100 million, and several other stellar properties important to scientists who study the evolution of stars and galaxies. The spacecraft had also acted like a cosmic fishing net, catching thousands of asteroids in our solar system and bright galaxies beyond our own.

“Something for everyone,” declared the European Space Agency, which launched and operates Gaia, when it made the census public.

Astronomers around the world pored over the data, exhilarated by the prospect of uncovering some science useful to their research. Among them was Teresa Antoja, a scientist at the University of Barcelona and one of the Gaia team members tasked with checking the spacecraft’s data.

Antoja and her colleagues were examining the movements of more than 6 million stars in the census when they noticed something very strange. The stars were all orbiting around the center of the Milky Way, as expected. But their individual paths in this great rotation weren’t uniform.

The researchers started grouping stars based on their motions. Then they added the stars’ exact position and velocity. When these three properties were combined in plots, an intriguing pattern emerged. The scientists saw a distinct shape overlaid against the usual distribution of the Milky Way—the delicate coils of a tight spiral, like in the shell of a snail.

“At the beginning, the features were very weird to us,” Antoja said in a press release about the findings, which were published in Nature this week. “I was a bit shocked and I thought there could be a problem with the data because the shapes are so clear.”

Antoja and her colleagues checked the data, and then checked and checked it some more. The snail shape persisted, so they concluded it was a real phenomenon. And since it wasn’t a glitch, it needed an explanation.

Amina Helmi, a scientist at the University of Groningen in the Netherlands and one of the study’s authors, suggested the involvement of a small galaxy called Sagittarius. Sagittarius is like a neighbor to the Milky Way. The small galaxy, consisting of a few tens of millions of stars, orbits near ours, and may have even swept past the Milky Way’s edges hundreds of millions of years ago. (The Milky Way is a pretty terrible neighbor, though, since it’s currently engaged in the very slow process of consuming Sagittarius.)

The scientists hypothesized that when Sagittarius swung by the Milky Way, it disturbed some stars with its gravity, putting them on funky trajectories compared with others in the galaxy. “It is a bit like throwing a stone in a pond, which displaces the water as ripples and waves,” Antoja explained. If any astronomers were around back then to plot the stars, they would have seen the same shell-like pattern in their behavior.

Based on the stars’ peculiar motions, the scientists predicted the flyby had occurred between 300 and 900 million years ago. When they checked previous research on Sagittarius, they found that other scientists had estimated that a close encounter between the two galaxies had unfolded between 200 million and 1 billion years ago. Their guess was in the right range.

According to Gaia’s data, the perturbed stars didn’t recover from the encounter—at least not completely. Hundreds of millions of years later, astronomers can still observe the effects of a galactic rendezvous. They can still see the stars clustered into the outlines of a shell, standing out against the rest of the glittering tapestry of the Milky Way.

And they wouldn’t have seen it without Gaia. No spacecraft has produced a star catalog this precise or expansive. Astronomers are still sorting through the census, looking for clues woven into the glittering tapestry of the Milky Way. There are likely many more surprises within, ready to enrich our understanding of our home in the universe.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.