We describe all regular tilings of the torus and the Klein bottle. We apply this to describe, for each orientable (respectively nonorientable) surface
S
S
, all (but finitely many) vertex-transitive graphs which can be drawn on
S
S
but not on any surface of smaller genus (respectively crosscap number). In particular, we prove the conjecture of Babai that, for each
g
⩾
3
g \geqslant 3
, there are only finitely many vertex-transitive graphs of genus
g
g
. In fact, they all have order
>
10
10
g
> {10^{10}}g
. The weaker conjecture for Cayley graphs was made by Gross and Tucker and extends Hurwitz’ theorem that, for each
g
⩾
2
g \geqslant 2
, there are only finitely many groups that act on the surface of genus
g
g
. We also derive a nonorientable version of Hurwitz’ theorem.