The standard cosmological model ($Lambda$-CDM) predicts that galaxies are built through hierarchical assembly on cosmological timescales$^{1,2}$. The Milky Way, like other disc galaxies, underwent violent mergers and accretion of small satellite galaxies in its early history. Thanks to Gaia-DR2$^3$ and spectroscopic surveys$^4$, the stellar remnants of such mergers have been identified$^{5-7}$. The chronological dating of such events is crucial to uncover the formation and evolution of the Galaxy at high redshift, but it has so far been challenging owing to difficulties in obtaining precise ages for these oldest stars. Here we combine asteroseismology -- the study of stellar oscillations -- with kinematics and chemical abundances, to estimate precise stellar ages ($sim$ 11%) for a sample of stars observed by the $mathit{Kepler}$ space mission$^8$. Crucially, this sample includes not only some of the oldest stars that were formed inside the Galaxy, but also stars formed externally and subsequently accreted onto the Milky Way. Leveraging this resolution in age, we provide compelling evidence in favour of models in which the Galaxy had already formed a substantial population of its stars (which now reside mainly in its thick disc) before the in-fall of the satellite galaxy Gaia-Enceladus/Sausage$^{5,6}$ around 10 billions years ago