Let G be a compact Lie group, and let LG denote the corresponding loop group. Let (X,ω) be a weakly symplectic Banach manifold. Consider a Hamiltonian action of LG on (X,ω), and assume that the moment map μ:X→L\fg∗ is proper. We consider the function ∣μ∣2:X→R, and use a version of Morse theory to show that the inclusion map j:μ−1(0)→X induces a surjection j∗:HG∗(X)→HG∗(μ−1(0)), in analogy with Kirwan's surjectivity theorem in the finite-dimensional case. We also prove a version of this surjectivity theorem for quasi-Hamiltonian G-spaces.