Nodal quasiparticles and the onset of spin-density-wave order in cuprate superconductors