  Let $X$ be any compact connected Riemann surface of genus $g \geq 3$. For any
$r\geq 2$, let $M_X$ denote the moduli space of holomorphic
$SL(r,C)$-connections over $X$. It is known that the biholomorphism class of
the complex variety $M_X$ is independent of the complex structure of $X$. If
$g=3$, then we assume that $r\geq 3$. We prove that the isomorphism class of
the variety $M_X$ determines the Riemann surface $X$ uniquely up to
isomorphism. A similar result is proved for the moduli space of holomorphic
$GL(r,C)$-connections on $X$.
  We also show that the Torelli theorem remains valid for the moduli spaces of
connections, as well as those of stable vector bundles, on geometrically
irreducible smooth projective curves defined over the field of real numbers.
