  Massive cores of the giant planets are thought to have formed in a gas disk
by accretion of pebble-size particles whose accretional cross-section is
enhanced by aerodynamic gas drag [1][2]. A commonly held view is that the
terrestrial planet system formed later (30-200 Myr after the dispersal of the
gas disk) by giant collisions of tens of roughly Mars-size protoplanets [3].
Here we propose, instead, that the terrestrial planets formed earlier by
gas-driven convergent migration of protoplanets toward $\sim\!1\,{\rm au}$
(related ref. [4] invoked a different process to concentrate planetesimals). To
investigate situations in which convergent migration occurs, we developed a
radiation-hydrodynamic model with realistic opacities [5][6] to determine the
thermal structure of the gas and pebble disks in the terrestrial planet zone.
We find that protoplanets rapidly grow by mutual collisions and pebble
accretion, and gain orbital eccentricities by gravitational scattering and the
hot-trail effect [7][8]. The orbital structure of the terrestrial planet system
is well reproduced in our simulations, including its tight mass concentration
at 0.7-1 au and the small sizes of Mercury and Mars. The early-stage protosolar
disk temperature exceeds 1500 K inside 0.4 au implying that Mercury grew in a
highly reducing environment, next to the evaporation lines of iron and
silicates, influencing Mercury's bulk composition [9]. In a late-stage cold gas
disk, accretion of icy/hydrated pebbles would contribute to Earth's water
budget.
