  We prove a topological extension of Dirac's theorem suggested by Gowers in
2005: for any connected, closed surface $\mathscr{S}$, we show that any
two-dimensional simplicial complex on $n$ vertices in which each pair of
vertices belongs to at least $n/3 + o(n)$ facets contains a homeomorph of
$\mathscr{S}$ spanning all the vertices. This result is asymptotically sharp,
and implies in particular that any 3-uniform hypergraph on $n$ vertices with
minimum codegree exceeding $n/3+o(n)$ contains a spanning triangulation of the
$2$-sphere.
