Scientists say they have found a galaxy with a "heartbeat," and were able to measure the effect the light of pulsating older red stars has on the surrounding galaxy.

When stars get older they become much brighter and swell up, enveloping any planets unfortunate enough to be close by, Yale University reported. Towards the end of their lifetime, the light from the stars begins to visibly pulsate.

"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.

Until recently, scientists had never taken into account the effect these older stars had on the light from distant galaxies as seen by Earthly telescopes. The light of pulsating stars mixes with that of other stars that do not vary in brightness.

"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, who led the research. "We decided to see if the pulsations of these stars could be detected even if we could not separate their light from the sea of unchanging stars that are their neighbors."

To make their findings, the researchers looked at a series of images from the galaxy M87, located in the constellation Virgo, taken by the Hubble Space Telescope over the course of three months. They noticed 25 percent of the pixels from the images pulsated in brightness almost as if the galaxy had a heartbeat. In the future, the team plans to seek out and measure these types of pulsations in other galaxies.

"Our models suggest that the pulsations will be stronger in younger galaxies, and that's something we'd love to test," said co-author Jieun Choi, a Harvard graduate student.

As these galaxies continue to age, their heartbeats will most likely get weaker, but researchers are confident they will continue to "beat" for a while longer.

"Cardiac arrest is not expected until a trillion years from now," van Dokkum said. "That's a hundred times longer than the age of the universe."

The findings were published in a recent edition of the journal Nature.