The center of the Milky Way harbors a supermassive black hole more than four million times the mass of our sun, about 25,000 light-years from Earth. Sagittarius B2 (Sgr B2) is one of the largest clouds of molecular gas in the Milky Way, shown here as the bright orange-red region at left and center (submillimeter-wavelength ATLASGAL data). This composite image includes infrared data (green and blue) from the Midcourse Space Experiment.

After decades of wondering why young massive stars don't blow away the gas surrounding them, astronomers have finally found a process that explains how these stellar youngsters hang on to their gassy envelopes.

This star type — more than 10 times the mass of the sun and most active in ultraviolet light — begins shining as a gigantic gas cloud collapses, fusing hydrogen into helium and igniting the star's nuclear engine. The new research shows that this gas accretion continues even as the star shines, counteracting the stellar radiation that "pushes" against the gas.

A new model reveals that the gas falls unevenly onto the star and also clumps into spiral "filamentary concentrations" because there is so much gas in a small area. When the star moves through the spirals, these filaments absorb the ultraviolet radiation the star emits, protecting the surrounding gas. Once the absorption stops, the gas nebulas shrink. [Top 10 Star Mysteries]

"These transitions from rarefied to dense gas and back again occur quickly compared to most astronomical events," Mac Low, a curator in the American Museum of Natural History's Department of Astrophysics and co-author of the paper, said in a statement. "We predicted that measurable changes could occur over times as short as a few decades."

Massive stars only influential not only when they are alive but also when they die. When a star of this size finishes burning the elements inside it, this triggers a massive collapse and explosion known as a supernova. These explosions created all elements in the universe that are heavier than iron, making Earth and other rocky planets possible.

The new models, based on observations from the Karl G. Jansky Very Large Array (VLA) in New Mexico, suggest that there are many small ionized hydrogen regions around these stars. The accretion process on the star kept going even after the hydrogen hotspots had formed, which was the opposite of what astronomers expected. Using models, astronomers then supposed that the gas falls unevenly on the star, creating the filaments.

Researchers came to this conclusion after using VLA observations of Sagittarius B2, a huge gas and dust cloud almost 400 light-years away from the center of the Milky Way galaxy. Between observations made in 1989 and 2012, researchers spotted four ionized hydrogen or HII regions getting brighter.

"The long-term trend is still the same, that HII regions expand with time," said study leader Christopher De Pree, an astronomer at Agnes Scott College. "But in detail, they get brighter or get fainter and then recover. Careful measurements over time can observe this more detailed process."

The research was recently published in Astrophysical Journal Letters and is also available in preprint form on Arxiv.

Follow Elizabeth Howell @howellspace, or Space.com @Spacedotcom. We're also on Facebook and Google+. Originally published on Space.com.