We present a new theoretical picture of magnetically dominated, decaying turbulence in the absence of a mean magnetic field. We demonstrate that such turbulence is governed by the reconnection of magnetic structures, and not by ideal dynamics, as has previously been assumed. We obtain predictions for the magnetic-energy decay laws by proposing that turbulence decays on reconnection timescales, while respecting the conservation of certain integral invariants representing topological constraints satisfied by the reconnecting magnetic field. As is well known, the magnetic helicity is such an invariant for initially helical field configurations, but does not constrain non-helical decay, where the volume-averaged magnetic-helicity density vanishes. For such a decay, we propose a new integral invariant, analogous to the Loitsyansky and Saffman invariants of hydrodynamic turbulence, that expresses the conservation of the random (scaling as $\mathrm{volume}^{1/2}$) magnetic helicity contained in any sufficiently large volume. Our treatment leads to novel predictions for the magnetic-energy decay laws: in particular, while we expect the canonical $t^{-2/3}$ power law for helical turbulence when reconnection is fast (i.e., plasmoid-dominated or stochastic), we find a shallower $t^{-4/7}$ decay in the slow `Sweet-Parker' reconnection regime, in better agreement with existing numerical simulations. For non-helical fields, for which there currently exists no definitive theory, we predict power laws of $t^{-10/9}$ and $t^{-20/17}$ in the fast- and slow-reconnection regimes, respectively. We formulate a general principle of decay of turbulent systems subject to conservation of Saffman-like invariants, and propose how it may be applied to MHD turbulence with a strong mean magnetic field and to isotropic MHD turbulence with initial equipartition between the magnetic and kinetic energies.