The ability to sense nanotelsa magnetic fields with nanoscale spatial resolution is an outstanding technical challenge relevant to the physical and biological sciences. For example, detection of such weak localized fields will enable sensing of magnetic resonance signals from individual electron or nuclear spins in complex biological molecules and the readout of classical or quantum bits of information encoded in an electron or nuclear spin memory. Here we present a novel approach to nanoscale magnetic sensing based on coherent control of an individual electronic spin contained in the Nitrogen-Vacancy (NV) center in diamond. At room temperature, using an ultra-pure diamond sample, we achieve shot-noise-limited detection of 3 nanotesla magnetic fields oscillating at kHz frequencies after 100 seconds of signal averaging. Furthermore, we experimentally demonstrate nanoscale resolution using a diamond nanocrystal of 30 nm diameter for which we achieve a sensitivity of 0.5 microtesla / Hz1/2.© (2009) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.