In 1973, Brown, ErdH{o}s and Sos proved that if $mathcal{H}$ is a 3-uniform hypergraph on $n$ vertices which contains no triangulation of the sphere, then $mathcal{H}$ has at most $O(n^{5/2})$ edges, and this bound is the best possible up to a constant factor. Resolving a conjecture of Linial, also reiterated by Keevash, Long, Narayanan, and Scott, we show that the same result holds for triangulations of the torus. Furthermore, we extend our result to every closed orientable surface $mathcal{S}$.