We demonstrate fully three-dimensional and patterned localization of nitrogenvacancy (NV) centers in diamond with coherence times in excess of 1 ms. Nitrogen δ-doping during CVD diamond growth vertically confines nitrogen to 4 nm while electron irradiation with a transmission electron microscope (TEM) laterally confines vacancies to less than 1 µm. We characterize the effects of electron energy and dose on NV formation. Importantly, our technique enables the formation of reliably high-quality NV centers inside diamond nanostructures, with applications in quantum information and sensing.Keywords: Nitrogen-vacancy center, diamond, quantum coherence, transmission electron microscopy Because of its solid-state host, natural coupling to photons, and long quantum coherence at room temperature, the NV center spin is promising in quantum photonics 1,2 , nanometer-scale field