The next time you gaze up at the night sky, remember that you’re looking at a graveyard. The Milky Way is studded with dead stars, from black holes to neutron stars to dim white dwarfs. Often, these stellar corpses reveal little about their past. But once in a while, they provide clues to how they—and any planets they once hosted—lived and died. Now, scientists have discovered evidence that a white dwarf known as GD 61 was once orbited by a rocky, water-rich asteroid—just the kind of thing you’d need to build a habitable alien world.

Most stars (including, in about 4 billion years, our sun) end their lives as white dwarfs, after they have burned all their nuclear fuel. These super dense stellar embers exert such strong gravity that any element heavier than helium will immediately sink to the dwarf’s core. So imagine astronomers’ surprise when they discovered that some white dwarfs are cloaked in layers of “pollution” made up of silicon, oxygen, and other elements much higher up on the periodic table.

This pollution is made up of “pieces of planetary systems that are falling into their central stars,” explains Jay Farihi, an astronomer at the University of Cambridge in the United Kingdom. By measuring the pollution’s constituent elements, scientists can peer back in time and discover what the original solar system’s asteroids, comets, and planets were made of. “It’s a wonderful technique for doing planetary forensics,” says Michael Jura, a white dwarf expert at the University of California, Los Angeles, who wasn’t involved in the current research.

In GD 61’s pollution, Farihi and his colleagues noticed a curious abundance of oxygen. Their first thought was that the original asteroid must have been encrusted with carbon dioxide in the form of dry ice. Trouble is, there was no carbon anywhere to be found around GD 61. So in order to account for the extra oxygen, “the only chemically viable substance left is water,” Farihi says.

Online today in Science, the team proposes that GD 61 has “shredded” a rocky asteroid that was 26% to 28% water . About the same size as Vesta in our solar system’s asteroid belt, the asteroid likely orbited the white dwarf’s precursor, an A-type star slightly bigger than the sun. After that star died, the white dwarf’s stronger gravity probably dragged in the asteroid and tore it apart.

Water-rich asteroids are considered to be important for the formation of habitable planets, crashing into them and supplying them with life-giving liquid water. Although “we certainly can’t rewind the clock completely” to discover what GD 61’s original solar system looked like, Farihi says, the discovery of the asteroid reveals “the building blocks of Earth-like planets were there.” In the future, he hopes to look at the system with a powerful telescope like the Atacama Large Millimeter/submillimeter Array radio array in Chile to see if any of the original planets survived the death of their star, or whether anything remains of the asteroid belt where the water-rich planetesimal was born.

Finding a water-rich asteroid near a white dwarf bolsters the long-shot idea that life might rise again around these dead stars, says John Debes, an astronomer at the Space Telescope Science Institute in Baltimore, Maryland, who wasn’t involved in the research. After their stars’ violent deaths, white dwarfs remain remarkably stable for billions more years, which would mean “they’d actually be really good places to live,” Debes says. The problem, however, is that a planet would have to be extremely close to a dim white dwarf to be warm enough to support life—as close as the devoured asteroid was to GD 61, in fact. Still, Debes says, if a rocky planet managed to settle into a stable orbit that close to a white dwarf, Farihi’s team’s discovery shows that “there might be some hope of getting water onto those planets” via asteroids—just what happened on Earth so many billions of years ago.