One of the telltale signs of a dying star is its tendency to pulsate.

This behavior has been seen in our own Milky Way but it has been difficult to document in distant galaxies. Now, a team of researchers from Harvard and Yale have for the first time shown that stars that are located tens of millions of light years away have a heartbeat, if you will.

“We tend to think of galaxies as steady beacons in the sky, but they are actually shimmering due to all the giant, pulsating stars in them,” said Pieter van Dokkum, the Sol Goldman Professor and chair of astronomy at Yale, and co-author of the study that appears this week in the journal Nature.

Related: Hubble space telescope captures stunning image of barred spiral galaxy

“These pulsating stars are rare. All stars go through this phase but it doesn’t last that long,” he told FoxNews.com. “You don’t see a lot of them but we figured the stars are so bright and change so much in their brightness we might be able to detect them in other galaxies than our own, even though there the light is completely swamped by all the stars that don’t vary, don’t have any changes.”

As they age, stars like our Sun undergo dramatic changes. They become extremely bright and become huge, swallowing any planets within a radius roughly equivalent to Earth’s distance from the Sun. And as they are dying, the stars, including scores in our Milky Way galaxy begin to pulsate, increasing and decreasing their brightness every few hundred days.

Related: The best of Hubble: NASA marks telescope's 25th anniversary

Setting their sights on the galaxy Messier 87, the researchers used three months of data collected by the Hubble Space Telescope in 2006 to detect thousands of stellar pulses – about one beat every 270 days. They were also able to measure the effect that pulsating, older red stars have on the light of their surrounding galaxy.

“We realized that these stars are so bright and their pulsations so strong, that they are difficult to hide,” said Charlie Conroy, an assistant professor at Harvard University and astronomer at the Harvard-Smithsonian Center for Astrophysics, who led the research.

The researchers had their work cut out for them when they decided to study M87, which is located 53 million light-years from Earth in the constellation Virgo. The images from Hubble that they studied contained 100 billion stars and each pixel alone contained a million stars.

“Each of those pixels has like a million stars in them because the galaxies are so far away that we don’t see individual stars. We just see the combined light of all the stars in the galaxy,” van Dokkum said.

Related: Hubble telescope captures images of galaxies from 13.2 billion years ago

“Normally, you wouldn’t be able to detect the light of an individual star in that pixel,” he said. “But because these pulsating stars are so bright and the pulsation is so strong, we could see that about a quarter of the pixels of the image changed their brightness. They changed it because the pixels contain these pulsating stars.”

Van Dokkum said the discovery could prompt astronomers to view the solar system in a different light.

“It leads to a different way of looking at galaxies, where we always see them as completely static in the sky, unchanging on human time scales,” he said. “In fact, they are shimmering. They are shimmering constantly. Every pixel in the image is getting brighter and fainter and they are not constant at all, which is sort of a different way of almost thinking about the light in the universe.”

The researchers said the discovery also offers a new way of measuring the age of a galaxy, because the strength and speed of a galaxy’s heartbeat varies depending on its age. The team found that M87 is about 10 billion years old, a number that roughly agrees with previous estimates using different techniques.

“For the age we thought - 10 billion years, we saw the exact number of stars that we expected,” van Dokkum said. “So, it turns out our models for this particular age are correct. Now, the next step is to look at younger galaxies and see if they have indeed stronger pulsations which we would predict.”

And the behavior of these stars so far away could offer a preview
of what we should expect to see closer to home when the Sun eventually dies.

“We care about these stars because it’s our own future,” van Dokkum said.

“The Sun will go through this phase in about 5 billion years so this phase of the evolution of stars has particular relevance to us,” he said. “It’s the death throes of these stars. It’s
quite spectacular. The Sun at some point will grow as large as the orbit of the Earth. The Earth will be burnt to a crisp. It won’t be a pleasant time to be around.”