  Charge-coupled devices (CCDs) are a leading technology in direct dark matter
searches because of their eV-scale energy threshold and high spatial
resolution. The sensitivity of future CCD experiments could be enhanced by
distinguishing nuclear recoil signals from electronic recoil backgrounds in the
CCD silicon target. We present a technique for event-by-event identification of
nuclear recoils based on the spatial correlation between the primary ionization
event and the lattice defect left behind by the recoiling atom, later
identified as a localized excess of leakage current under thermal stimulation.
By irradiating a CCD with an $^{241}$Am$^{9}$Be neutron source, we demonstrate
$>93\%$ identification efficiency for nuclear recoils with energies $>150$ keV,
where the ionization events were confirmed to be nuclear recoils from topology.
The technique remains fully efficient down to 90 keV, decreasing to 50$\%$ at 8
keV, and reaching ($6\pm2$)$\%$ at 1.5--3.5 keV. Irradiation with a $^{24}$Na
$\gamma$-ray source shows no evidence of defect generation by electronic
recoils, with the fraction of electronic recoils with energies $<85$ keV that
are spatially correlated with defects $<0.1$$\%$.
