A group of scientists used NASA’s Hubble Space Telescope and discovered that the Andromeda galaxy, the nearest major galaxy to Earth, is surrounded by a massive halo of gas. The halo, which extends about a million light-years from Andromeda, nearly halfway to the Milky Way galaxy, is being considered a significant feature of Andromeda.

The Andromeda galaxy, also known as Messier 31 or M31, is the biggest galaxy in the Local Group of galaxies, which also includes the Milky Way and nearly 45 other known galaxies. With one trillion stars, the Andromeda is estimated to be about 25 percent more luminous than the Milky Way. The new discovery is expected to help astronomers better understand the evolution and structure of giant spiral galaxies such as Andromeda and Milky Way, scientists said in a study published in the Astrophysical Journal earlier this week.

“Halos are the gaseous atmospheres of galaxies,” Nicolas Lehner, an astrophysicist at the University of Notre Dame in Indiana and the study’s lead author, said in a statement. “The properties of these gaseous halos control the rate at which stars form in galaxies.”

Although the halo’s size is apparently 100 times the diameter of the moon, the gas in the halo is invisible. To study the halo, the scientists observed quasars, very distant star-like objects, which shine brightly due to the presence of gas falling onto supermassive black holes in their cores.

“As the light from the quasars travels toward Hubble, the halo’s gas will absorb some of that light and make the quasar appear a little darker in just a very small wavelength range,” J. Christopher Howk, an associate professor of physics at Notre Dame, said in the statement. “By measuring the dip in brightness, we can tell how much halo gas from M31 there is between us and that quasar.”

An earlier study had suggested that the Milky Way galaxy will be gobbled up by the Andromeda galaxy in about five billion years from now as massive galaxies in the universe have stopped making their own stars and are snacking on their own kind to grow.

Scientists have predicted in the new study that if Milky Way possesses a halo similar to that found around Andromeda, the halos of the two galaxies may merge well before the two massive galaxies collide, eventually forming a giant elliptical galaxy.