Markarian 1018 is an "active galaxy" that has brightened and dimmed over about 30 years.

A decades-old galactic mystery has just been solved — new research has revealed why a distant galaxy has brightened and dimmed like a flickering candle flame over the last 30 years.

The galaxy, known as Markarian 1018, is considered an "active galaxy," meaning it has an extremely bright core called an "active galactic nucleus" (AGN). Even though AGNs take up a relatively small fraction of space, the light from some of them can outshine the light from all the stars in their host galaxy.

Supermassive black holes lie at the center of many active galaxies and material falling into these black holes is accelerated, causing it to radiate light, according to a statement from NASA. When the black hole isn't being fed enough material, though, the AGN's light dims. [The 10 Strangest Things in Space]

This is what's happening to the Markarian 1018 galaxy, according to two new research papers appearing in the September 2016 issue of the Astronomy & Astrophysics Journal. The new work relied on data from multiple telescopes and observatories.

Markarian 1018 is different from most other active galaxies because it has changed type (faint or bright) twice, and in the "blink of an eye," astronomically speaking, according to the statement. The galaxy went from faint to bright in the 1980s, and then dimmed to eight times fainter in the X-rays between 2010 and 2016, according to NASA.

There are two reasons an AGN could dim over time. The nucleus could simply be surrounded by gas and dust and become obscured (so it only appears to change brightness). The second possibility is that the supermassive black hole at the center is not being fed enough material to keep the galaxy shining so bright.

Using ground telescopes like the European Southern Observatory's Very Large Telescope, researchers were able to rule out the possibility that the galaxy brightened due to the black hole consuming a single star. Data from the Chandra X-Ray Observatory collected in 2010 and 2016 proved that a surrounding cloud of gas was not obscuring the AGN, creating the flickering.

Finally, data from three different telescopes — the Hubble Space Telescope, NASA's Galaxy Evolution Explorer and the Sloan Digital Sky Survey — showed that Markarian 1018 dimmed in both observable light and in X-rays because the black hole at its center was "starving" for material, NASA said in the statement.

While they're not sure exactly what could cause this starvation, NASA astronomers believe there could be a second black hole in Markarian 1018 that's disrupting the flow of material to the first black hole. This is possible, they say in the statement, because Markarian 1018 is the result of a collision between two galaxies, both of which possibly had black holes at the center.

Follow Kasandra Brabaw on Twitter @KassieBrabaw. Follow us @Spacedotcom, Facebook and Google+. Original article on Space.com.