## Main

To unravel the assembly history of our Galaxy we need to learn how many stars were born when, from what material and on what orbits. This requires precise age determinations for a large sample of stars that extend to the oldest possible ages (around 14 Gyr)9,12. Subgiant stars, which are stars sustained by hydrogen shell fusion, can be unique tracers for such purposes, as they exist in the brief stellar evolutionary phase that permits the most precise and direct age determination, because their luminosity is a direct measure of their age. Moreover, the chemical element compositions determined from the spectra of their photosphere surfaces accurately reflect their birth material composition billions of years ago. This makes subgiants the best practical tracers of Galactic archaeology, even compared to main-sequence turn-off stars, whose surface abundances may be altered by atomic diffusion effects13. However, because of the short lifetime of their evolutionary phase, subgiant stars are relatively rare, and large surveys are essential to build a large sample of these objects with good spectra, which have not been available in the past.

With the recent data release (eDR3) of the Gaia mission14,15 and the recent data release (DR7) of the LAMOST spectroscopic survey16,17, we identify a set of approximately 250,000 subgiant stars based on their position in the effective temperatures (Teff)–absolute magnitude (MK) diagram (Fig. 1a). The ages (τ) of these subgiant stars are estimated by fitting to the Yonsei–Yale (YY) stellar isochrones18 with a Bayesian approach, which draws on the astrometric distances (parallaxes), apparent magnitudes (fluxes), spectroscopic chemical abundances ([Fe/H], [α/Fe] where α refers to α elements Mg, Si, Ca, Ti), Teff and MK. As summarized in Fig. 1b, the sample stars have a median relative age uncertainty of only 7.5% across the age range from 1.5 Gyr to the age of the Universe (13.8 Gyr; ref. 19). The lower age limit of our sample is inherent to our approach: younger and hence more luminous subgiants can be confused with a different stellar evolutionary phase, the horizontal branch phase for far older stars, which would cause serious sample contamination. This sample constitutes a 100-fold leap in sample size for stars with comparably precise and consistent age estimates20,21. In addition, it is a large sample that covers a large spatial volume across the Milky Way (Fig. 1c) and most of the pertinent range in age and in metallicity (1.5 Gyr < τ < 13.8 Gyr, and −2.5 < [Fe/H] < 0.4). The sample also has a straightforward spatial selection function that allows us to estimate the space density of the tracers. These ingredients enable an alternative view of the Milky Way’s assembly history, especially the early formation history.

### Our Galaxy’s stellar age–metallicity distribution

The photospheric metallicity of any subgiant star of age τ reflects the element composition of the gas from which it formed at the epoch τ Gyr ago. The overall distribution of these stellar metallicities at different epochs, p(τ, [Fe/H]), thus encodes the chemical enrichment history of our Milky Way galaxy. Figure 2a presents this distribution for our data. It shows that the age–metallicity distribution exhibits a number of prominent and distinct sequences, including at least two age-separated sequences with [Fe/H] > −1, and a sequence of exclusively old stars at low metallicity, [Fe/H] < −1. The density of p(τ, [Fe/H]) may change with stellar orbit or Galactocentric radius, in the range our sample covers (6–14 kpc; Fig. 1). Yet, the ‘morphology’ of the distribution varies only slightly, enabling us to focus on the radially averaged distribution p(τ, [Fe/H]) here.

It turns out that the complexity of p(τ, [Fe/H]) (Fig. 2a) can be unravelled by dividing the sample into two subsamples using stellar quantities that are neither τ nor [Fe/H]: the angular momentum Jϕ (also denoted as LZ) and the ‘α-enhancement’, [α/Fe]. Extensive observations indicate that the majority of stars in the Milky Way formed from gradually enriched gas on high-angular momentum orbits, or the extended (‘thin’) disk4,22, at high Jϕ and low [α/Fe]. It is also well established that the distribution of Galactic stars in the [α/Fe]–[Fe/H] plane is bimodal, with a high-α sequence reflecting rapid enrichment and a low-α sequence reflecting gradual enrichment, which indicates a natural way to divide any sample in the [α/Fe]–[Fe/H] plane8. This inspired our approach to divide our sample into two, separating the dominant sample portion of gradually enriched disk stars with high angular momentum from the rest. Specifically, we used the cut

$$\{\begin{array}{c}\begin{array}{cc}{J}_{\varphi } > 1500\,{\rm{kpc}}.{\rm{km}}/{\rm{s}} & {\rm{and}}\end{array}\\ \{\begin{array}{cc}[\alpha /Fe] > 0.16, & {\rm{if}}\,[{\rm{Fe}}/{\rm{H}}]\, > -0.5,\\ \,[\alpha /Fe] < -0.16[{\rm{Fe}}/{\rm{H}}]\,+0.08, & {\rm{if}}\,[{\rm{Fe}}/{\rm{H}}]\, > -0.5,\end{array}\end{array}$$
(1)

which is illustrated as a yellow shaded area in Fig. 2b, c. The resulting subsamples in the τ–[Fe/H] plane are shown in Fig. 2d, e, where it is crucial to recall that the sample split involved neither of the quantities on the two axes, τ and [Fe/H]. As we want to focus first on the Milky Way’s elemental enrichment history, rather than its star-formation history, we normalize the distribution p(τ, [Fe/H]) at each [Fe/H] to yield p(τ | [Fe/H]), the age distribution at a given [Fe/H].

Figure 2d, e shows that this cut in angular momentum and [α/Fe] separates the Milky Way’s enrichment history neatly into two distinct age regimes, with a rather sharp transition at τ 8 Gyr. We will therefore refer to these two portions, not clearly apparent in earlier data, as $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{late}}}$$ and $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{early}}}$$. The distribution of $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{late}}}$$ clearly exhibits a V-shape23. This shape is presumably a consequence of the secular evolution of the dynamically quiescent disk; the metal-rich ([Fe/H]  −0.1) branch arises from stars that have migrated from the inner disk to near the Solar radius. The slope of that branch in $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{late}}}$$ then results from the (negative) radial metallicity gradient in the disk1 and the fact that the stars that have migrated more needed more time to do so, and are hence older. Analogously, we presume the lower branch of $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{late}}}$$ at [Fe/H]  −0.1 to arise from stars that were born further out and have migrated inwards6. A quantitative comparison with secular evolution models of the Galactic disk4,22 is part of separate ongoing work.

The older stars, reflected in $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{early}}}$$, show two prominent sequences with distinct [Fe/H](τ) relations. The stars with −2.5 < [Fe/H] < −1.0 reflect the well-established stellar halo population of our Milky Way, whereas the more metal-rich sequence ([Fe/H]  −1) reflects the Milky Way’s inner, high-α (thick) disk24; this designation as an old disk component is also justified by the stars’ angular momentum, as we will show below.

The morphology of the old disk sequence in $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{early}}}$$ is the most striking feature in Fig. 2e; it reveals an exceptionally clear, continuous and tight age–metallicity relation from [Fe/H]  −1 at 13 Gyr ago all the way to [Fe/H]  0.5 at 7 Gyr ago. A simple model for p(τ | [Fe/H]) of this sequence (Supplementary Information) finds an intrinsic age dispersion of less than 0.82  Gyr at a given [Fe/H] across this 6 Gyr interval (Extended Data Fig. 1). Given the sequence’s slope, this implies that the [Fe/H] dispersion at a given age is smaller than 0.22 dex across the 1.5 dex range in [Fe/H].

Both the halo and old disk sequences extend to [Fe/H]  −1. However, at that [Fe/H] value, the old disk sequence is approximately 2 Gyr older than the halo sequence, leading to a Z-shaped structure in $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{early}}}$$. This feature is a second aspect of the distribution that has not, to our knowledge, been seen before21.

### Formation and enrichment of the Milky Way’s old disk

Tentative hints for some of these features in p(τ | [Fe/H]) have been seen in earlier work24,25 (see the discussion in the Supplementary Information) but these studies lacked the sample size or precision for definitive inferences about the Galactic formation history. Figure 2 shows clearly that the old, high-α ‘thick’ disk of our Milky Way started to form approximately 13 Gyr ago, which is only 0.8 Gyr after the Big Bang19, and extended over 5–6 Gyr, and the interstellar stellar medium (ISM) forming the stars was continually enriched by more than 1 dex, from [Fe/H]  −1 to 0.5. The tightness of this [Fe/H]–age sequence implies that the ISM must have remained spatially mixed thoroughly during this entire period. Had there been any radial (or azimuthal) [Fe/H] variations (or gradients) in excess of 0.2 dex in the star-forming ISM at any time, this would have increased the resulting [Fe/H]–age scatter beyond what is seen. Such gradients, along with orbital migration, are the main reason that the later Galactic disk shows a considerably higher [Fe/H] dispersion at a given age4,26. The results also show that the formation of the Milky Way’s old, α-enhanced disk overlapped in time with the formation of the halo stars: the earliest disk stars are 1–2 Gyr older than the major halo populations at [Fe/H]  −1 (see the Z-shaped structure).

In Fig. 3 we examine the $$p{(\tau |[{\rm{Fe}}/{\rm{H}}])}_{{\rm{early}}}$$ distribution more closely by separating stars with at least modest angular momentum, Jϕ > 500 kpc km s–1, from those stars on nearly radial or even retrograde orbits, Jϕ < 500 kpc km s–1. This further sample differentiation by angular momentum leads again to two nearly disjoint p(τ | [Fe/H]) distributions. The first (Fig. 3, upper panel), with mostly [Fe/H] > −1, is dominated by the tight p(τ | [Fe/H]) sequence that we we have already attributed to the old disk. The second, predominately [Fe/H] < −1.2, reflects the halo.

Note that Fig. 3, lower panel shows a distinct set of stars with Jϕ < 500 kpc km s–1, for which the p(τ | [Fe/H]) locus indicates that they are the oldest and most metal-poor part of the old disk sequence (see also Extended Data Fig. 2). These stars indicate that some of the oldest members of the old disk sequence were present during an early merger event, by which they were ‘splashed’ to low-angular-momentum orbits27,28. This ancient merger event is presumably the merger with the Gaia-Enceladus satellite galaxy11 (also known as Gaia Sausage10; hereafter Gaia-Sausage-Enceladus), which has contributed most of the Milky Way’s halo stars7,29. The fact that the splashed old disk stars with very little angular momentum are exclusively seen at τ 11 Gyr constitutes strong evidence that the major merger process between the old disk and the Gaia-Sausage-Enceladus satellite galaxy was largely completed 11 Gyr ago. This epoch is 1 Gyr earlier than previous estimates that were based on the lower age limit of the halo stars, 10 Gyr (refs. 11,21,30).

Figure 3 shows the volume-corrected two-dimensional distribution p(τ, [Fe/H]) (see the Supplementary Information for the correction of the volume selection effect), rather than the p(τ | [Fe/H]) of Fig. 2. Figure 3 reveals a remarkable feature, namely that the star-formation rate of the old disk reached a prominent maximum at  around 11.2 Gyr ago, apparently just when the merger with the Gaia-Sausage-Enceladus satellite galaxy was completed, and then continuously declined with time. The most obvious interpretation of this coincidence is that the perturbation from the Gaia-Sausage-Enceladus satellite galaxy greatly enhanced the star formation of the old disk. Note that this star-formation peak among the old disk stars ~11 Gyr ago is very consistent with earlier indications of such a peak based on abundances only31.

To put our results into the bigger picture of galaxy formation and evolution, the multiple assembly phases are seen to be universal among present-day star-forming galaxies. Using the IllustriesTNG simulation, Wang et al.32 showed that galaxy mergers and interactions have played a crucial role in inducing gas inflow, resulting in multiple star formation episodes, intermitted by quiescent phases. Observationally, the best testbed for this theoretical picture would be here at home within our Galaxy. Our study has demonstrated the power of such tests for galactic assembly and enrichment history in the full cosmic timeline, from the very early epoch (τ 13 Gyr or redshift z > 10) to the current time.

## Methods

### Stellar labels from spectroscopy

Building this sample of subgiant stars with precise ages, abundances and orbits requires a number of steps. The first step is to derive stellar atmospheric parameters from the LAMOST DR7 spectra, which we did using the data-driven Payne (DD-Payne) approach, verified in detail using analogous data from LAMOST DR5 (ref. 33). This leads to a catalogue of effective temperature Teff, surface gravity log g, microturbulent velocity vmic and elemental abundance for 16 elements (C, N, O, Na, Mg, Al, Si, Ca, Ti, Cr, Mn, Fe, Co, Ni, Cu, Ba) values for 7 million stars. We also derive an α-element to iron abundance ratio [α/Fe], which will serve in the age estimation to identify the right set of isochrones for each object. For a spectral signal-to-noise ratio (S/N) higher than 50, the typical measurement uncertainties are about 30 K in Teff and 0.05 dex in the abundances we use here: [Fe/H] and [α/Fe] (ref. 33).

### Absolute magnitude and spectroscopic parallax

Determining accurate and precise absolute magnitudes is crucial for age determination of subgiant stars (Fig. 1a). The Gaia astrometry provides high-precision parallax for stars within approximately 2 kpc, whereas for more distant stars the Gaia parallaxes have uncertainties in excess of 10%. For these distant stars, spectroscopic estimates of absolute magnitude are needed to ensure precise age determination. We derive MK, the absolute magnitude in the Two Micron All Sky Survey (2MASS) K band, from the LAMOST spectra, using a data-driven method based on neural network modelling (see Supplementary Information for details). Extended Data Figure 3 illustrates that for LAMOST spectra with high signal-to-noise ratio (S/N > 80), our spectroscopic MK estimates are precise to better than 0.1 mag at [Fe/H] = 0 (and 0.15 mag at [Fe/H] = −1). Furthermore, a comparison between spectroscopic MK and geometric MK from Gaia parallaxes provides an efficient way of identifying unresolved binaries33,34 (Extended Data Fig. 3). For the subsequent modelling, we combine these two approaches through a weighted mean algorithm

$${M}_{{\rm{K}}}=\frac{{{M}_{{\rm{K}}}}^{{\rm{geom}}}/{\sigma }_{{\rm{geom}}}^{2}+{{M}_{{\rm{K}}}}^{{\rm{spec}}}/{\sigma }_{{\rm{spec}}}^{2}}{{\sigma }_{{\rm{spec}}}^{-2}+{\sigma }_{{\rm{geom}}}^{-2}}.$$

Here MKgeom refers to the geometric MK, i.e., MK derived using Gaia parallax, MKspec the spectroscopic MK estimates, and σ the uncertainty in the MK estimates. We are then in a position to select subgiant stars as lying between the two straight lines in the TeffMK diagram. As isochrones depend on [Fe/H], this is done separately for each [Fe/H] bin, with the adopted slopes and intercepts for the boundary lines presented in Extended Data Table 1. As an example, the boundaries for stars with solar metallicity are shown in the Fig. 1a. To ensure the boundaries vary smoothly with [Fe/H], we interpolate the slopes and intercepts listed in Extended Data Table 1 to match the measured [Fe/H] for each star.

### Cleaning sample cuts

To have a subgiant star sample with high purity, we have applied cleaning criteria to discard stars with poor data quality or stars that are possible contaminations of the subgiant sample.

• We discard unresolved binaries that we identify through differences in their spectro-photometric parallax and their geometric parallax from Gaia, by requiring

$$\frac{{\varpi }_{{\rm{spec}}-{\rm{photo}}}-{\varpi }_{{\rm{geom}}}}{\sqrt{{\sigma }_{{\rm{spec}}}^{2}+{\sigma }_{{\rm{geom}}}^{2}}} > 2$$
(3)

Here $${\varpi }_{s{\rm{pec}}-{\rm{photo}}}$$ is the spectro-photometric parallax deduced from the distance modulus using the spectroscopic MK and 2MASS apparent magnitudes35.

• We discard stars with spurious Gaia astrometry by requiring a Gaia re-normalized unit weight error (RUWE) larger than 1.2 or an astrometric fidelity less than 0.8 (ref. 36).

• We discard stars that show significant flux variability according to the variation amplitude of the Gaia magnitudes between different epochs,

$${\varDelta }_{{\rm{G}}}=\frac{\sqrt{{\rm{PHOT}}\_{\rm{G}}\_{\rm{N}}\_{\rm{OBS}}}}{{\rm{PHOT}}\_{\rm{G}}\_{\rm{MEAN}}\_{\rm{FLUX}}\_{\rm{OVER}}\_{\rm{ERROR}}}$$
(4)

where PHOT_G_N_OBS is the number of epochs, and PHOT_G_MEAN_FLUX_OVER_ERROR is the mean flux over error ratio for Gaia G-band photometry. We calculate the ensemble median $$(\overline{{\varDelta }_{{\rm{G}}}})$$ and dispersion σ(ΔG) of ΔG as a function of G-band magnitude and define any one star as a variable if

$$\frac{{\varDelta }_{{\rm{G}}}-\overline{{\varDelta }_{{\rm{G}}}}}{\sigma ({\varDelta }_{{\rm{G}}})} > 3$$
(5)

Most of the variables eliminated by this criterion are found to be pre-main-sequence stars.

• We discard stars that are less luminous than the subgiant branch of a 20 Gyr isochrone, which is the boundary of our isochrone grid. Such stars are mainly contaminations of either pre-main-sequence stars or main-sequence binary stars that survived elimination by the above criteria.

• We discard all stars with MK brighter than 0.5 mag to avoid contamination from He-burning horizontal branch stars. This comes at a price: we eliminate essentially all stars younger than about 1.5 Gyr.

• We require all stars in our sample to have LAMOST spectral S/N > 20 and to have good DD-Payne fits, by requiring ‘qflag_χ2 = good’33. We further restrict our stars to have Teff < 6,800 K, where DD-Payne abundances are most robust.

After these cleaning cuts, the remaining sample contains 247,104 stars (Fig. 1), all of which are presumed to be subgiants.

### Age estimates by isochrones

The ages of the subgiant sample stars are determined by matching the Gaia astrometric parallax ϖ, the LAMOST spectroscopic stellar parameters Teff, MK, [Fe/H] and [α/Fe], and the Gaia and 2MASS photometry in the G, BP, RP, J, H and K bands with the YY stellar isochrones18,37 using a Bayesian approach (see Supplementary Information for details). Note that in our Bayesian model we have chosen not to impose a prior that all stars should be younger than the current knowledge of the age of the Universe from the cosmic microwave background measurements of Planck (13.8 Gyr)19. This is for two main reasons. First, the upper limit of the stellar age is an independent examination of the age of the Universe, whereas imposing age priors on the inference from the cosmological model might induce bias into the results. Second, imposing an upper age limit may increase the complexity of the statistics.

To convert the Gaia parallax to absolute magnitudes, we also need to know the extinction. Therefore, we have determined the reddening and extinction for individual stars using intrinsic colours empirically inferred from their stellar parameters (see Supplementary Information for details).

We have also tested the age estimation using other public isochrones, such as the MIST38,39, and find that, in the case of the solar α-mixture, the age estimates based on YY and MIST show good consistency except for the fact that the MST isochrones predict ages older by 0.5 Gyr (Extended Data Fig. 4). However, the α-element enhancement, which is not available in the current public MIST isochrones, has a large impact on the age estimation, and ignoring the α-element enhancement will lead to an overestimate of stellar age by up to 2 Gyr for old stars (Extended Data Fig. 4). Ages from the YY isochrones seem to be reasonable as the ages of the oldest stars are comparable to the age of the Universe (Fig. 2).

### Orbital actions

Using the radial velocity from the LAMOST data, proper motions from Gaia and a combination of spectro-photometric distance and geometric distance (see Supplementary Information for details), we compute the orbital actions (JR, Jϕ, JZ) and the angles of our sample stars using galpy40, assuming the MWPotential2014 potential model. We assume that the Sun is located at R = 8.178 kpc (ref. 41) and Z = 10 pc above the disk mid-plane42. We assume the local standard of rest LSR = 220 km s–1, and the solar motion with respect to the LSR to be (U, V, W) = (−7.01 km s–1, 10.13 km s–1, 4.95 km s–1) (ref. 43).

### Accounting for selection effects

To verify that our findings are not caused by artefacts due to selection effects, we adopt two approaches to address this issue. First, we apply our target selection to the Gaia mock catalogue of Rybizki et al.44 and investigate the age–[Fe/H] relation (Extended Data Fig. 5). Second, we directly correct for the volume selection function of our sample to account for the fact that, for a given line of sight, older subgiant stars probe to a smaller distance than the younger stars as the former are fainter. The age distribution of the thick disk stars after applying the selection function correction is illustrated in Fig. 3. Eventually, we concluded that the selection function has a negligible impact on our conclusions (see Supplementary Information for more details).

In addition, we have compared the stellar age–[Fe/H] relation from our sample with literature results for both stars25 and globular clusters45,46,47 that have robust age estimates (Extended Data Fig. 6). The comparisons are qualitatively consistent, albeit the literature samples are too small to draw a clear picture of the assembly and enrichment history of our Galaxy (see Supplementary Information for a detailed discussion).