The center of the Sagittarius dwarf spheroidal galaxy (Sgr dSph) hosts a nuclear star cluster, M54, which is the only galaxy nucleus that can be resolved into individual stars at optical wavelengths. It is thus a key target for understanding the formation of nuclear star clusters and their relation to globular clusters. We present a large Multi-Unit Spectroscopic Explorer (MUSE) data set that covers M54 out to ∼2.5 half-light radius, from which we extracted the spectra of ∼6 600 cluster member stars. We use these data in combination with HST photometry to derive age and metallicity for each star. The stellar populations show a well defined age-metallicity relation, implying an extended formation history for the central region of Sgr dSph. We classify these populations into three groups, all with the same systemic velocity: young metal rich (YMR; 2.2 Gyr, [Fe/H]= −0.04); intermediate age metal rich (IMR; 4.3 Gyr, [Fe/H]= −0.29); and old metal poor (OMP; 12.2 Gyr, [Fe/H]= − 1.41). The YMR and OMP populations are more centrally concentrated than the IMR population, which are likely stars of the Sgr dSph. We suggest the OMP population is the result of accretion and merging of two or more old and metal poor globular clusters dragged to the center by dynamical friction. The YMR is consistent with being formed by in situ star formation in the nucleus. The ages of the YMR population suggest that it may have been triggered into forming when the Sgr dSph began losing its gas during the most recent interaction with the Milky Way, ∼3 Gyr ago.