Magnetic resonance imaging (MRI) is well known as a powerful technique for visualizing subsurface structures with three-dimensional spatial resolution. Pushing the resolution below 1 micro m remains a major challenge, however, owing to the sensitivity limitations of conventional inductive detection techniques. Currently, the smallest volume elements in an image must contain at least 10(12) nuclear spins for MRI-based microscopy, or 10(7) electron spins for electron spin resonance microscopy. Magnetic resonance force microscopy (MRFM) was proposed as a means to improve detection sensitivity to the single-spin level, and thus enable three-dimensional imaging of macromolecules (for example, proteins) with atomic resolution. MRFM has also been proposed as a qubit readout device for spin-based quantum computers. Here we report the detection of an individual electron spin by MRFM. A spatial resolution of 25 nm in one dimension was obtained for an unpaired spin in silicon dioxide. The measured signal is consistent with a model in which the spin is aligned parallel or anti-parallel to the effective field, with a rotating-frame relaxation time of 760 ms. The long relaxation time suggests that the state of an individual spin can be monitored for extended periods of time, even while subjected to a complex set of manipulations that are part of the MRFM measurement protocol.