  The full two-loop amplitudes for five massless states in Type~II and
Heterotic superstrings are constructed in terms of convergent integrals over
the genus-two moduli space of compact Riemann surfaces and integrals of Green
functions and Abelian differentials on the surface. The construction combines
elements from the BRST cohomology of the pure spinor formulation and from
chiral splitting with the help of loop momenta and homology invariance. The
$\alpha' \to 0$ limit of the resulting superstring amplitude is shown to be in
perfect agreement with the previously known amplitude computed in Type~II
supergravity. Investigations of the $\alpha'$ expansion of the Type~II
amplitude and comparisons with predictions from S-duality are relegated to a
first companion paper. A construction from first principles in the RNS
formulation of the genus-two amplitude with five external NS states is
relegated to a second companion paper.
