  We show that X-ray reverberation mapping can be used to measure the distance
to type 1 active galactic nuclei (AGNs). This is because X-ray photons
originally emitted from the `corona' close to the black hole irradiate the
accretion disc and are re-emitted with a characteristic `reflection' spectrum
that includes a prominent $\sim 6.4$ keV iron emission line. The shape of the
reflection spectrum depends on the irradiating flux, and the light-crossing
delay between continuum photons observed directly from the corona and the
reflected photons constrains the size of the disc. Simultaneously modelling the
X-ray spectrum and the time delays between photons of different energies
therefore constrains the intrinsic reflected luminosity, and the distance
follows from the observed reflected flux. Alternatively, the distance can be
measured from the X-ray spectrum alone if the black hole mass is known. We
develop a new model of our RELTRANS X-ray reverberation mapping package, called
RTDIST, that has distance as a model parameter. We simulate a synthetic
observation that we fit with our new model, and find that this technique
applied to a sample of $\sim 25$ AGNs can be used to measure the Hubble
constant with a $3 \sigma$ statistical uncertainty of $\sim 6~{\rm km}~{\rm
s}^{-1}{\rm Mpc}^{-1}$. Since the technique is completely independent of the
traditional distance ladder and the cosmic microwave background radiation, it
has the potential to address the current tension between them. We discuss
sources of modelling uncertainty, and how they can be addressed in the near
future.
