We give a derivation of general relativity (GR) and the gauge principle that is novel in presupposing neither spacetime nor the relativity principle. We consider a class of actions defined on superspace (the space of Riemannian 3-geometries on a given bare manifold). It has two key properties. The first is symmetry under 3-diffeomorphisms. This is the only postulated symmetry, and it leads to a constraint linear in the canonical momenta. The second property is that the Lagrangian is constructed from a 'local' square root of an expression quadratic in the velocities. The square root is 'local' because it is taken before integration over 3-space. It gives rise to quadratic constraints that do not correspond to any symmetry and are not, in general, propagated by the Euler-Lagrange equations. Therefore these actions are internally inconsistent. However, one action of this form is well behaved: the Baierlein-Sharp-Wheeler (BSW [1]) reparametrisation-invariant action for GR. From this viewpoint, spacetime symmetry is emergent. It appears as a 'hidden' symmetry in the (underdetermined) solutions of the Euler-Lagrange equations, without being manifestly coded into the action itself. In addition, propagation of the linear diffeomorphism constraint together with the quadratic square-root constraint acts as a striking selection mechanism beyond pure gravity. If a scalar field is included in the configuration space, it must have the same characteristic speed as gravity. Thus Einstein causality emerges. Finally, self-consistency requires that any 3-vector field must satisfy Einstein causality, the equivalence principle and, in addition, the Gauss constraint. Therefore we recover the standard (massless) Maxwell equations.