The strength and spectrum of the extragalactic magnetic field (EGMF) a
re still unknown. Its measurement would help answer the question of wh
ether galactic fields are purely a primordial relic or whether they we
re dynamically enhanced from a much smaller cosmological seed field. I
n this Letter, we show that the composition, spectrum, and directional
distribution of extragalactic ultra-high-energy cosmic rays, with ene
rgies above similar or equal to 10(18) eV, can probe the large-scale c
omponent of the EGMF below the present observational upper limit of 10
(-9) G. Cosmic-ray detectors under construction or currently in the pr
oposal stage should be able to test the existence of the EGMFs on scal
es of a few to tens of megaparsecs and strengths in the range similar
or equal to 10(-10) to 10(-9) G.