  It is widely held that the first step in forming the gas giant planets, such
as Jupiter and Saturn, is to form solid `cores' of roughly 10 M$_\oplus$.
Getting the cores to form before the solar nebula dissipates
($\sim\!1-10\,$Myr) has been a major challenge for planet formation models.
Recently models have emerged in which `pebbles' (centimeter- to meter-size
objects) are first concentrated by aerodynamic drag and then gravitationally
collapse to form 100 --- 1000 km objects. These `planetesimals' can then
efficiently accrete leftover pebbles and directly form the cores of giant
planets. This model known as `pebble accretion', theoretically, can produce 10
M$_\oplus$ cores in only a few thousand years. Unfortunately, full simulations
of this process show that, rather than creating a few 10 M$_\oplus$ cores, it
produces a population of hundreds of Earth-mass objects that are inconsistent
with the structure of the Solar System. Here we report that this difficulty can
be overcome if pebbles form slowly enough to allow the planetesimals to
gravitationally interact with one another. In this situation the largest
planetesimals have time to scatter their smaller siblings out of the disk of
pebbles, thereby stifling their growth. Our models show that, for a large, and
physically reasonable region of parameter space, this typically leads to the
formation of one to four gas giants between 5 and 15 AU in agreement with the
observed structure of the Solar System.
