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 real rank 2 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üller 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 of 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.The spaces X max,sw2 sw1 (Γ, PSp(4, R)) are singular, but the singularities consist only of Z 2 and Z 2 ⊕ Z 2 -orbifold points. The space H ′ /Z 2 also has an orbifold structure. The homeomorphism above is an orbifold isomorphism, in particular, it is smooth away from the singular set.Corollary 7. Each space X max,sw2 sw1 (Γ, PSp(4, R)) deformation retracts onto the quotient of (S 1 ) 2g−2 by inversion. In particular, its rational cohomology is: PSp(4, R)), Q) ∼ = H j ((S 1 ) 2g−2 , Q) if j is even, 0 otherwise.
Character varieties and Higgs bundlesIn this section we recall general facts about character varieties and Higgs bundles.