Resonant oscillators with stable frequencies and large quality factors help us to keep track of time with high precision. Examples range from quartz crystal oscillators in wristwatches to atomic oscillators in atomic clocks, which are, at present, our most precise time measurement devices1. The search for more stable and convenient reference oscillators is continuing2–6. Nuclear oscillators are better than atomic oscillators because of their naturally higher quality factors and higher resilience against external perturbations7–9. One of the most promising cases is an ultra-narrow nuclear resonance transition in 45Sc between the ground state and the 12.4-keV isomeric state with a long lifetime of 0.47 s (ref. 10). The scientific potential of 45Sc was realized long ago, but applications require 45Sc resonant excitation, which in turn requires accelerator-driven, high-brightness X-ray sources11 that have become available only recently. Here we report on resonant X-ray excitation of the 45Sc isomeric state by irradiation of Sc-metal foil with 12.4-keV photon pulses from a state-of-the-art X-ray free-electron laser and subsequent detection of nuclear decay products. Simultaneously, the transition energy was determined as $${\mathrm{12,389.59}}_{+0.12\left({\rm{syst}}\right)}^{\pm 0.15\left({\rm{stat}}\right)}\,{\rm{eV}}$$
12,389.59
+
0.12
syst
±
0.15
stat
eV
with an uncertainty that is two orders of magnitude smaller than the previously known values. These advancements enable the application of this isomer in extreme metrology, nuclear clock technology, ultra-high-precision spectroscopy and similar applications.