  A topological theory for euclidean gravity in eight dimensions is built by
enforcing octonionic self-duality conditions on the spin connection. The
eight-dimensional manifold must be of a special type, with G_2 or Spin(7)
holonomy. The resulting theory is related to a twisted version of N=1, D=8
supergravity. The situation is comparable to that of the topological
Yang--Mills theory in eight dimensions, for which the SO(8) invariance is
broken down to Spin(7), but is recovered after untwisting the topological
theory.
