Astronomers have detected the first planet orbiting a star that has passed through the red giant phase, the massive bloating that befalls sun-like stars when their nuclear fuel begins to run out.

The so-called exoplanet likely survived a close brush with its star, V391 Pegasi, despite once orbiting at roughly the same distance that lies between the sun and Earth, according to a study published in Nature.

Researchers believe that when the sun goes red giant in five billion or six billion years, it will swallow Mercury and Venus, but they are unsure about Earth's future. Will solar wind vaporize our home planet? Could it tumble into the sun? The discovery does not reveal Earth's destiny, but it suggests that further observations of similar star systems could lead to models that can, says astrophysicist Roberto Silvotti of the Capodimonte Observatory in Naples, Italy.

When a medium-size star like the sun burns most of its nuclear fuel, it collapses and then balloons into a cooler red giant. Eventually much of this new outer envelope blows away, but in about 2 percent of cases, stars lose nearly their entire envelope.

Researchers believe V391 Pegasi is such a star, called a B subdwarf, that shrunk from about 0.9 solar mass during its youth to 0.5 solar mass today. It is also one of a handful of B subdwarfs known to pulsate in brightness every few minutes.

Silvotti and his colleagues chanced upon the new planet, V391 Pegasi b, during a seven-year study of these pulsations. Looking for clues to the star's structure, they noticed a regular variation in the timing of the pulses, which implied the presence of a planet at least 3.2 times the mass of Jupiter tugging the star back and forth.

The variations indicate that V391 Pegasi b orbits at about 160 million miles, or 1.7 times Earth's distance from the sun, called an astronomical unit (AU). The most likely scenario, the researchers say, is that the planet once orbited about one AU from V391 Pegasi, which closed the gap to 0.3 AU during its red giant phase and finally lost its outer mass, allowing the planet to migrate farther away.

The finding "does suggest at least some of the planets in our solar system will survive through the red giant phase," says astrophysicist Matt Burleigh of the University of Leicester in England. He says it also boosts the odds of discovering planets around white dwarfs, the typical remnants of stars like our sun that have passed through a second, bigger red giant phase.

Such planets could finally spell out Earth's fate. "Until you start finding planets around these stars," Burleigh says, "theoreticians can only make guesses."