Within a cluster of stars 18,000 light-years away, near the bustling center of the galaxy, a pair of stars is locked in a tight and dramatic orbital embrace. One is a puffy low-mass star; the other a rapidly-spinning neutron star, a super-dense stellar corpse that pulls in material from its companion. Together this binary pair creates a bright x-ray source known as IGR J18245-2452 — and it exhibits not just one but two very different personalities.

VIDEO: Why Do Stars Twinkle?

As material from the large, low-mass star is pulled into a hot accretion disk swirling around its companion and interacts with its magnetic field, powerful x-rays are emitted, detectable as a “low-mass binary” by x-ray-sensitive telescopes like NASA’s Chandra X-ray Observatory and ESA’s XMM-Newton.

But as the neutron star absorbs material from the spinning accretion disk it gains momentum, spinning faster and faster and ramping-up its magnetic field even further. As the flow of material from the low-mass star slows, the neutron star — now spinning madly, up to 254 times a second — throws much of the material in the disk out of the system entirely. With the x-ray emitting material gone, the neutron star is free to blast jets of radio waves out into space from its poles. It’s now a millisecond pulsar, and to anything aligned with its poles it flashes in radio like a lighthouse beacon on overdrive.

Talk about dancing with the stars.

Watch an animation of this process in action.

While the full transition of a low-mass x-ray binary to millisecond pulsar is a process that’s thought to take place over billions of years, IGR J18245-2452 has given astronomers evidence that switches — in both directions — can occur much more rapidly… within a period of just a few days, in fact.

Top 10 Spitzer Nebula Stunners

It’s the first time that the transition between these particular two stages of stellar evolution has been directly observed.

“We’ve been fortunate enough to see all stages of this process, with a range of ground and space telescopes. We’ve been looking for such evidence for more than a decade,” said Dr. Alessandro Papitto, lead author of the paper published in the Sept. 26, 2013 issue of Nature.

“It’s like a teenager who switches between acting like a child and acting like an adult,” said John Sarkissian, a co-author who observed the system with CSIRO’s Parkes radio telescope in Australia.

And since some scientists think this same process could actually “rejuvenate” older pulsars by increasing their rotation rates via accretion, it could also be compared to an adult acting like a kid again.

Eventually, over the course of millions of years, the larger companion star will become a white dwarf and will have no more material to share with its spinning companion, leaving it to remain as a millisecond pulsar.

Read more on the Chandra news release and on ESA’s XMM-Newton page. 

Image credit: X-ray: NASA/CXC/ICE/A.Papitto et al.