Résumé : Among the short-lived radioactive nuclei inferred to be present in the early solar system via meteoritic analyses, there are several heavier than iron whose stellar origin has been poorly understood. In particular, the abundances inferred for (182)Hf (half-life = 8.9 million years) and (129)I (half-life = 15.7 million years) are in disagreement with each other if both nuclei are produced by the rapid neutron-capture process. Here, we demonstrate that contrary to previous assumption, the slow neutron-capture process in asymptotic giant branch stars produces (182)Hf. This has allowed us to date the last rapid and slow neutron-capture events that contaminated the solar system material at ~100 million years and ~30 million years, respectively, before the formation of the Sun.