A sweeping census of galaxies dating back to when the universe was just 2.5 billion years old shows an early and puzzling divide between two main types -- the relatively flat, pancake-shaped galaxies that continue to pop out new stars and their spherical cousins which are filled with old stars that have remained virtually unchanged through the eons.

Whatever shut down star formation in those galaxies is unknown, but the new study, based on the single largest Hubble Space Telescope project, indicates it happened early and fast.

PHOTOS: Hubble's Latest Mind Blowing Cosmic Pictures

“For the first time we have access to very large samples of distant galaxies, observed with data that is very high quality,” astronomer Mauro Giavalisco, with the University of Massachusetts, told Discovery News.

“It’s pretty conclusive that the diversification of galaxies into this spheroidal-type and the disk-type is a process that started very early. It was already there in place at the time when the universe was a mere 2.5 billion years old. It's something that happened very quickly,” he said.

It was astronomer Edwin Hubble, for whom the space telescope is named, who first classified galaxies into two main types.

Scientists later fleshed out Hubble’s 1926 landmark work with additional details showing the two basic types of galaxies not only had different structures, but also different stellar populations.

Computer models have pretty much nailed down how big clouds of dust and gas can collapse under their own weight and pancake themselves into disks. These structures eventually feed a central region that ends up looking like a bulge. Our Milky Way galaxy is an example.

More puzzling is what happens in the other types of galaxies, the spheroids, or elliptical galaxies.

At a distance of 230 million light-years, NGC 1275 is one of the closest giant elliptical galaxies.NASA

“These are essentially dead galaxies, but they're not small. They're massive galaxies with a lot of gravity,” Giavalisco said. “So why is it that a galaxy that potentially has all the gravity it needs to attract gas and keep making babies and keep forming stars, for some reason does not do that?"

“The quenching of the star-formation activity is a process that happens quickly in the history of the universe and we don’t know how,” he added.

One possibility is that these galaxies harbor monster-sized black holes that radiate out so much heat, gas in the galaxies can’t cool down to form stars.

BLOG: Hubble's Best Ever View of a Giant Cosmic... Doughnut?

Another idea it there are too many massive, hot stars squeezed together into too small of a space, generating so much heat that, like the black hole theory, gas cannot cool and form new stars.

“The galaxy dies, essentially self-strangulated," Giavalisco said. "But why does this only happen to spheroidal galaxies and not to disk galaxies? It’s not obvious. And why so quickly?”

The study, headed by BoMee Lee of the University of Massachusetts, pushes back the time frame for when modern galaxies emerged to about 2.5 billion years after the universe’s creation some 13.8 billion years ago.  Previous galaxy surveys studied objects that formed about 5 billion years after the Big Bang.

“This is the only comprehensive study to date of the visual appearance of the large, massive galaxies that existed so far back in time,” astronomer Arjen van der Wel with the Max Planck Institute for Astronomy in Germany, added in a statement.

“The galaxies look remarkably mature, which is not predicted by galaxy formation models to be the case that early on in the history of the universe,” van der Wel said.

The research  appears in The Astrophysical Journal.