Determining the chronology for the assembly of planetary bodies in the early Solar System is essential for a complete understanding of star- and planet-formation processes. Various radionuclide chronometers (applied to meteorites) have been used to determine that basaltic lava flows on the surface of the asteroid Vesta formed within 3 million years (3Myr) of the origin of the Solar System. Such rapid formation is broadly consistent with astronomical observations of young stellar objects, which suggest that formation of planetary systems occurs within a few million years after star formation. Some hafnium-tungsten isotope data, however, require that Vesta formed later (~16Myr after the formation of the Solar System) and that the formation of the terrestrial planets took a much longer time (62-14+4504Myr). Here we report measurements of tungsten isotope compositions and hafnium-tungsten ratios of several meteorites. Our measurements indicate that, contrary to previous results, the bulk of metal-silicate separation in the Solar System was completed within �Myr. These results are completely consistent with other evidence for rapid planetary formation, and are also in agreement with dynamic accretion models that predict a relatively short time (~10Myr) for the main growth stage of terrestrial planet formation.