  We show that the competition between magnetism and superconductivity can be
used to determine the pairing state in the iron arsenides. To this end we
demonstrate that the itinerant antiferromagnetic phase (AFM) and the
unconventional $s^{+-}$ sign-changing superconducting state (SC) are near the
borderline of microscopic coexistence and macroscopic phase separation,
explaining the experimentally observed competition of both ordered states. In
contrast, conventional $s^{++}$ pairing is not able to coexist with magnetism.
Expanding the microscopic free energy of the system with competing orders
around the multicritical point, we find that static magnetism plays the role of
an intrinsic interband Josephson coupling, making the phase diagram sensitive
to the symmetry of the Cooper pair wavefunction. We relate this result to the
quasiparticle excitation spectrum and to the emergent SO$(5)$ symmetry of
systems with particle-hole symmetry. Our results rely on the assumption that
the same electrons that form the ordered moment contribute to the
superconducting condensate and that the system is close to particle-hole
symmetry. We also compare the suppression of SC in different regions of the
FeAs phase diagram, showing that while in the underdoped side it is due to the
competition with AFM, in the overdoped side it is related to the disappearance
of pockets from the Fermi surface.
