  The lunar crater record features $\sim 50$ basins. The radiometric dating of
Apollo samples indicates that the Imbrium basin formed relatively late -- from
the planet formation perspective -- some $\simeq 3.9$ Ga. Here we develop a
dynamical model for impactors in the inner solar system to provide context for
the interpretation of the lunar crater record. The contribution of cometary
impactors is found to be insignificant. Asteroids produced most large impacts
on the terrestrial worlds in the last $\simeq 3$ Gyr. The great majority of
early impactors were rocky planetesimals left behind at $\sim 0.5$--1.5 au
after the terrestrial planet accretion. The population of terrestrial
planetesimals was reduced by disruptive collisions in the first $t \sim 20$ Myr
after the gas disk dispersal. We estimate that there were $\sim 4 \times 10^5$
diameter $d>10$ km bodies when the Moon formed (total planetesimal mass $\sim
0.015$ $M_{\rm Earth}$ at $t \sim 50$ Myr). The early bombardment of the Moon
was intense. To accommodate $\sim 50$ known basins, the lunar basins that
formed before $\simeq 4.35$--4.41 Ga must have been erased. The late formation
of Imbrium occurs with a $\sim 15$--35\% probability in our model. About 20
$d>10$-km bodies were expected to hit the Earth between 2.5 and 3.5 Ga, which
is comparable to the number of known spherule beds in the late Archean. We
discuss implications of our model for the lunar/Martian crater chronologies,
Late Veneer, and noble gases in the Earth atmosphere.
