  We extend the framework of modular invariant supersymmetric theories to
encompass invariance under more general discrete groups $\Gamma$, that allow
the presence of several moduli and make connection with the theory of
automorphic forms. Moduli span a coset space $G/K$, where $G$ is a Lie group
and $K$ is a compact subgroup of $G$, modded out by $\Gamma$. For a general
choice of $G$, $K$, $\Gamma$ and a generic matter content, we explicitly
construct a minimal K\"ahler potential and a general superpotential, for both
rigid and local $N=1$ supersymmetric theories. We also specialize our
construction to the case $G=Sp(2g,R)$, $K=U(g)$ and $\Gamma=Sp(2g,Z)$, whose
automorphic forms are Siegel modular forms. We show how our general theory can
be consistently restricted to multi-dimensional regions of the moduli space
enjoying residual symmetries. After choosing $g=2$, we present several examples
of models for lepton and quark masses where Yukawa couplings are Siegel modular
forms of level 2.
