We construct a new off-shell invariant in supergravity whose leading term is the square of the Riemann tensor. It contains a gravitational Chern–Simons term involving the vector field that belongs to the supergravity multiplet. The action is obtained by mapping the transformation rules of a spin connection with bosonic torsion and a set of curvatures to the fields of the Yang–Mills multiplet with gauge group SO(4, 1). We also employ the circle reduction of an action that describes locally supersymmetric Yang–Mills theory in six dimensions.