For the final running period of HERA, a recoil detector was installed at the HERMES experiment to improve measurements of hard exclusive processes in charged-lepton nucleon scattering. Here, deeply virtual Compton scattering is of particular interest as this process provides constraints on generalised parton distributions that give access to the total angular momenta of quarks within the nucleon. The HERMES recoil detector was designed to improve the selection of exclusive events by a direct measurement of the four-momentum of the recoiling particle. It consisted of three components: two layers of double-sided silicon strip sensors inside the HERA beam vacuum, a two-barrel scintillating fibre tracker, and a photon detector. All sub-detectors were located inside a solenoidal magnetic field with a field strength of 1 T. The recoil detector was installed in late 2005. After the commissioning of all components was finished in September 2006, it operated stably until the end of data taking at HERA end of June 2007. The present paper gives a brief overview of the physics processes of interest and the general detector design. The recoil detector components, their calibration, the momentum reconstruction of charged particles, and the event selection are described in detail. The paper closes with a summary of the performance of the detection system. KEYWORDS: dE/dx detectors; Gamma detectors (scintillators, CZT, HPG, HgI etc); Particle tracking detectors; Particle tracking detectors (Solid-state detectors); Detector alignment and calibration methods; Particle identification methods; Data acquisition concepts; Front-end electronics for detector readout. 1 The distributions for exclusive ρ 0 , π 0 and η production look similar.