Two enormous galaxies seen merging in the distant universe have astronomers rethinking the leading theory of how galaxies form.

When the universe was in its infancy, the very first galaxies were tiny "dwarf galaxies" that clumped together to form the larger galaxies seen today. Known as hierarchical formation, this theory suggests that galaxies form in a step-by-step process as smaller galaxies are pulled together by their mutual gravitational attraction.

But now, the recent discovery of two distant galaxies that are abnormally huge has led astronomers to rethink that theory because it suggests that those dwarf galaxies assembled into large galaxies a lot faster than previously thought.

Astronomers at the Atacama Large Millimeter/submillimeter Array (ALMA) in Chile were surprised to find that these gigantic galaxies existed when the universe was only 780 million years old, or about 5 percent of its current age of 13.8 billion years. Because the light from those galaxies takes about 13 billion years to reach Earth, astronomers observing those galaxies are looking back in time at how the galaxies appeared 13 billion years ago.

"With these exquisite ALMA observations, astronomers are seeing the most massive galaxy known in the first billion years of the universe in the process of assembling itself," Dan Marrone, an associate professor of astronomy at the University of Arizona in Tucson and lead author of the new paper, said in a statement.

A composite image shows ALMA data of the two galaxies of SPT0311-58 in red. These galaxies are shown over a background image from the Hubble Space Telescope. (Image credit: Marrone, et al./B. Saxton/AUI/NSF/ALMA/ESO/NAOJ/NRAO/NASA/ESA/Hubble)

"We usually view that as the time of little galaxies working hard to chew away at the neutral intergalactic medium," Marrone said. “Mounting observational evidence with ALMA, however, has helped to reshape that story and continues to push back the time at which truly massive galaxies first emerged in the universe."

Around that same time in the ancient universe, dark matter — a mysterious, invisible form of matter that accounts for about a quarter of the universe's mass — also began to form clumps. As gravity pulled together clumps of both visible matter and dark matter, galaxies were born inside "halos" of dark matter. In a way, dark matter acts as scaffolding for young galaxies as they form by providing the gravity needed to pull mass together.

In this case, astronomers saw that both giant galaxies reside inside one even more enormous dark-matter halo. The researchers said that this is one of the largest examples of a dark-matter halo ever discovered.

To top it off, the two galaxies appear to be merging and will someday form "the largest galaxy ever observed at that period in cosmic history," ALMA officials said in the statement. "This discovery provides new details about the emergence of large galaxies and the role that dark matter plays in assembling the most massive structures in the universe."

The two galaxies, collectively known as SPT0311-58, were originally spotted by astronomers at the South Pole Telescope in Antarctica. Initially, the scientists thought SPT0311-58 was a single galaxy, but further observations by ALMA found that SPT0311-58 is actually a pair of huge galaxies.

"There are more galaxies discovered with the South Pole Telescope that we're following up on," said Joaquin Vieira, a co-author of the study and astronomy professor at the University of Illinois. "Our hope is to find more objects like this, possibly even more distant ones, to better understand this population of extreme dusty galaxies and especially their relation to the bulk population of galaxies at this epoch."

The study was published online today (Dec. 6) in the journal Nature.

Email Hanneke Weitering at hweitering@space.com or follow her @hannekescience. Follow us @Spacedotcom, Facebook and Google+. Original article on Space.com.