In a glimpse of the dismal fate awaiting Earth, scientists for the first time have observed a star, bloated in its old age, swallowing a Jupiter-like planet, then expelling some material into space in an energetic belch.

Researchers said on Wednesday the star was in the early stages of what is called the red giant phase late in its lifespan as it depleted hydrogen fuel in its core and its dimensions began to expand. As the star grew, its surface reached the orbit of the doomed planet, with mayhem ensuing.

The star, which started out similar to our sun in size and composition, is located in our Milky Way galaxy about 12,000 light-years from Earth in the direction of the constellation Aquila. A light year is the distance light travels in a year, 9.5 trillion kilometers. The star is around 10 billion years old, twice as old as the sun.