The barrage of comets and asteroids that produced many young lunar basins (craters over 300 kilometres in diameter) has frequently been called the Late Heavy Bombardment (LHB). Many assume the LHB ended about 3.7 to 3.8 billion years (Gyr) ago with the formation of Orientale basin. Evidence for LHB-sized blasts on Earth, however, extend into the Archaean and early Proterozoic eons, in the form of impact spherule beds: globally distributed ejecta layers created by Chicxulub-sized or larger cratering events. At least seven spherule beds have been found that formed between 3.23 and 3.47 Gyr ago, four between 2.49 and 2.63 Gyr ago, and one between 1.7 and 2.1 Gyr ago. Here we report that the LHB lasted much longer than previously thought, with most late impactors coming from the E belt, an extended and now largely extinct portion of the asteroid belt between 1.7 and 2.1 astronomical units from Earth. This region was destabilized by late giant planet migration. E-belt survivors now make up the high-inclination Hungaria asteroids. Scaling from the observed Hungaria asteroids, we find that E-belt projectiles made about ten lunar basins between 3.7 and 4.1 Gyr ago. They also produced about 15 terrestrial basins between 2.5 and 3.7 Gyr ago, as well as around 70 and four Chicxulub-sized or larger craters on the Earth and Moon, respectively, between 1.7 and 3.7 Gyr ago. These rates reproduce impact spherule bed and lunar crater constraints.