We present the result of an experiment to measure the electric dipole moment (EDM) of the neutron at the Paul Scherrer Institute using Ramseys method of separated oscillating magnetic fields with ultracold neutrons (UCN). Our measurement stands in the long history of EDM experiments probing physics violating time reversal invariance. The salient features of this experiment were the use of a Hg-199 co-magnetometer and an array of optically pumped cesium vapor magnetometers to cancel and correct for magnetic field changes. The statistical analysis was performed on blinded datasets by two separate groups while the estimation of systematic effects profited from an unprecedented knowledge of the magnetic field. The measured value of the neutron EDM is $d_{rm n} = (0.0pm1.1_{rm stat}pm0.2_{rm sys})times10^{-26}e,{rm cm}$.