Jupiter is mighty now, but it may have been built on the backs of tiny pebbles. (NASA)

The massive gas giants in our solar system -- Saturn and Jupiter -- were likely the first planets to form. But scientists aren't quite sure how that process got started. In a study published Wednesday in Nature, researchers present one possible explanation: Tiny pebbles quickly accumulated to form their cores.

Previously, most believed that the cores of these huge planets must have been made during the collision of fairly large bodies -- rocks almost as big as planets in their own right. The new theory, which used computer modeling to simulate the formation, suggests that tiny particles (tiny in the cosmic sense, at about a foot across each) would be more likely than large chunks of rock to form gas giants.

[Newly discovered, Jupiter-like planet may sit in a solar system much like our own]

Pebbles and larger chunks -- called planetesimals -- are related. Both exist in the mess of gas and dust left after the formation of a new star. In fact, planetesimals only form after pebbles have the chance to link up with one another. But by the time they get to planetesimal size, these chunks have enough of their own gravity to avoid crashing into each other (at least most of the time). Pebbles, on the other hand, are still prone to getting sucked into the gravity of anything larger.

In the latest model, larger chunks of rock would have hogged all the pebbles, sucking them up to facilitate quick, massive growth instead of allowing the tiny rocks to spread equally throughout the growing solar system.

Pebble accretion could form gas giants up to 1,000 times faster than previous models, which would explain why Jupiter and Saturn were able to come on the scene so quickly after the birth of the solar system. And the models predict that one to four gas giants would be formed by this process, and would orbit the sun at five to 15 times the distance of Earth, which fits with the facts.

Read More:

Uranus might be full of surprises

Jupiter might have wrecked the first version of our solar system

Why NASA’s top scientist is sure that we’ll find signs of alien life in the next decade

This beautiful cosmic bubble is actually a dying star

For the first time ever, scientists spot an aurora outside our solar system