Globular clusters trace the formation history of the spheroidal components of our Galaxy and other galaxies, which represent the bulk of star formation over the history of the Universe. The clusters exhibit a range of metallicities (abundances of elements heavier than helium), with metal-poor clusters dominating the stellar halo of the Galaxy, and higher-metallicity clusters found within the inner Galaxy, associated with the stellar bulge, or the thick disk. Age differences between these clusters can indicate the sequence in which the components of the Galaxy formed, and in particular which clusters were formed outside the Galaxy and were later engulfed along with their original host galaxies, and which were formed within it. Here we report an absolute age of 9.9 +/- 0.7 billion years (at 95 per cent confidence) for the metal-rich globular cluster 47 Tucanae, determined by modelling the properties of the cluster's white-dwarf cooling sequence. This is about two billion years younger than has been inferred for the metal-poor cluster NGC 6397 from the same models, and provides quantitative evidence that metal-rich clusters like 47 Tucanae formed later than metal-poor halo clusters like NGC 6397.