  In this paper we describe the space of maximal components of the character
variety of surface group representations into PSp(4,R) and Sp(4,R). For every
rank 2 real Lie group of Hermitian type, we construct a mapping class group
invariant complex structure on the maximal components. For the groups PSp(4,R)
and Sp(4,R), we give a mapping class group invariant parameterization of each
maximal component as an explicit holomorphic fiber bundle over Teichm\"uller
space. Special attention is put on the connected components which are singular,
we give a precise local description of the singularities and their geometric
interpretation. We also describe the quotient of the maximal components for
PSp(4,R) and Sp(4,R) by the action of the mapping class group as a holomorphic
submersion over the moduli space of curves. These results are proven in two
steps, first we use Higgs bundles to give a non-mapping class group equivariant
parameterization, then we prove an analogue of Labourie's conjecture for
maximal PSp(4,R) representations.
