We show that the mapping class group acts properly on the space of maximal representations of the fundamental group of a closed Riemann surface into G when G = Sp(2n,R), SU(n,n), SO*(2n) or Spin(2,n).