  Ultrafaint dwarf galaxies ($M_\star\lesssim10^{5-6}\,{\rm M}_\odot$) are
relics of an early phase of galaxy formation. They contain some of the oldest
and most metal-poor stars in the Universe which likely formed before the epoch
of hydrogen reionisation. These galaxies are so faint that they can only be
detected as satellites of the Milky Way. They are so small that they are just
barely resolved in current cosmological hydrodynamics simulations. Here we
combine very high resolution cosmological $N$-body simulations with a
semi-analytic model of galaxy formation to study the demographics and spatial
distribution of ultrafaint satellites in Milky Way-mass haloes. We show that
the abundance of these galaxies is correlated with the assembly history of the
host halo: at fixed mass, haloes assembled earlier contain, on average, more
ultrafaint satellites today than haloes assembled later. We identify simulated
galactic haloes that experience an ancient Gaia-Enceladus-Sausage-like and a
recent LMC-like accretion event and find that the former occurs in 33% of the
sample and the latter in 9%. Only 3% experience both events and these are
especially rich in ultrafaint satellites, most acquired during the ancient
accretion event. Our models predict that the radial distribution of satellites
is more centrally concentrated in early-forming haloes. Accounting for the
depletion of satellites by tidal interactions with the central disc, we find a
very good match to the observed radial distribution of satellites in the Milky
Way over the entire radial range. This agreement is mainly due to the ability
of our model to track 'orphan' galaxies after their subhaloes fall below the
resolution limit of the simulation.
