High magnetic fields have revealed a surprisingly small Fermi surface in underdoped cuprates, possibly resulting from Fermi-surface reconstruction due to an order parameter that breaks translational symmetry of the crystal lattice. A crucial issue concerns the doping extent of such a state and its relationship to the principal pseudogap and superconducting phases. We employ pulsed magnetic-field measurements on the cuprate HgBa2CuO4+δ to identify signatures of Fermi-surface reconstruction from a sign change of the Hall effect and a peak in the temperature-dependent planar resistivity. We trace the termination of Fermi-surface reconstruction to two hole concentrations where the superconducting upper critical fields are found to be enhanced. One of these points is associated with the pseudogap endpoint near optimal doping. These results connect the Fermi-surface reconstruction to both superconductivity and the pseudogap phenomena.