The rocky planets closest to the sun are made up of very different materials than the gas giants in the outer solar system. That's because billions of years ago, our baby solar system was divided in two by a cosmic gatekeeper that prevented materials in the inner and outer regions from mixing.

It turns out that gatekeeper was a ring of dust and gas, according to a new study. The fence, or "Great Divide," a term coined by the authors, is now mostly empty space just inside Jupiter's orbit.

About two decades ago, chemists realized that the building blocks of planets — asteroid-size planetesimals or much smaller "pebbles" — had very different compositions depending on their distance from the sun. The pebbles that built up the outer, or "jovian," planets contained higher concentrations of organic molecules such as carbon and volatiles, or ices and gases, than those that built up the "terrestrial" planets closer to the sun, such as Earth and Mars.

Related: 15 Amazing Images of Stars

But that was puzzling, because the theory predicted that pebbles from the outer solar system should have spiraled toward the inner solar system, because of what's called "gas drag," or the gravitational pull of the gas surrounding the young sun.

Before this study, scientists thought that "the gravitational wall that prevented mixing between the inner and outer disk of our nascent solar system was Jupiter," said senior author Stephen Mojzsis, a professor of geochemistry at the University of Colorado Boulder. The thinking was that Jupiter was so large, and its gravitational pull so strong, that it gobbled up small pebbles before they could reach the inner solar system.

To test this theory, Mojzsis and lead author Ramon Brasser, a researcher at the Earth-Life Science Institute at the Tokyo Institute of Technology in Japan, created computer simulations that re-created the growth of the early solar system and the planets within it.

The simulation revealed that Jupiter could not grow fast enough to keep out all the carbon-rich pebbles from flowing into the inner solar system. In fact, most of the pebbles from the outer solar system passed straight on by the growing Jupiter.

"Jupiter is a very inefficient gatekeeper," Mojzsis told Live Science. "It's like a porous border [through which] immigrants from the outer solar system would have flooded the inner solar system." Jupiter by itself would have let through many pebbles, meaning that planets in the outer and inner solar system would have turned out to have similar compositions, he added.

Instead, the two scientists proposed another theory: early on in the solar system's history, there could have existed a ring, or multiple rings of alternating bands of high and low pressure gas and dust circling the sun. Those rings would have prevented pebbles from moving inward. They based their hypothesis on observations from the Atacama Large Millimeter/Submillimeter Array (ALMA) in Chile, which showed that about 2 in 5 young stars had these bull's-eye-like disks around them.

These high-pressure disks could have trapped dust and caused it to aggregate in distinct groups — one that would form Jupiter and Saturn and another Earth and Mars, for example. One of these sinks could have prevented outer pebbles from moving in toward the sun, creating the Great Divide, Mojzsis said. Even so, this ring wouldn't have been fully sealed. That would have allowed carbonaceous pebbles to flow into the inner solar system, creating the seeds for life on Earth, he added.

It's an "interesting idea," said Michiel Lambrechts, a postdoctoral fellow at the Lund Observatory in Sweden who was not a part of the study. "However, although the authors present work that illustrates the challenge of splitting the inner and outer solid reservoirs with a growing Jupiter, they do not make similarly detailed ring model."

This ring model needs to demonstrate how the pebbles are trapped and how the planets end up growing in such pebble traps, he added. Until then, "it remains hard to strongly favor this ring model over other potential explanations."

The findings were published today (Jan. 13) in the journal Nature Astronomy.

Originally published on Live Science.