The present paper reports high-accuracy cross-section data for the 2H(n,nnp) reaction in the neutron-proton (np) and neutron-neutron (nn) final-state-interaction (FSI) regions at an incident mean neutron energy of 13.0 MeV. These data were analyzed with rigorous three-nucleon calculations to determine the 1S0 np and nn scattering lengths, a_np and a_nn. Our results are a_nn = -18.7 +/- 0.6 fm and a_np = -23.5 +/- 0.8 fm. Since our value for a_np obtained from neutron-deuteron (nd) breakup agrees with that from free np scattering, we conclude that our investigation of the nn FSI done simultaneously and under identical conditions gives the correct value for a_nn. Our value for a_nn is in agreement with that obtained in pion-deuteron capture measurements but disagrees with values obtained from earlier nd breakup studies.