In the high-latitude regions of Earth, aurorae are the often-spectacular visual manifestation of the interaction between electrically charged particles (electrons, protons or ions) with the neutral upper atmosphere, as they precipitate along magnetic field lines. More generally, auroral emissions in planetary atmospheres "are those that result from the impact of particles other than photoelectrons" (ref. 1). Auroral activity has been found on all four giant planets possessing a magnetic field (Jupiter, Saturn, Uranus and Neptune), as well as on Venus, which has no magnetic field. On the nightside of Venus, atomic O emissions at 130.4 nm and 135.6 nm appear in bright patches of varying sizes and intensities, which are believed to be produced by electrons with energy <300 eV (ref. 7). Here we report the discovery of an aurora in the martian atmosphere, using the ultraviolet spectrometer SPICAM on board Mars Express. It corresponds to a distinct type of aurora not seen before in the Solar System: it is unlike aurorae at Earth and the giant planets, which lie at the foot of the intrinsic magnetic field lines near the magnetic poles, and unlike venusian auroras, which are diffuse, sometimes spreading over the entire disk. Instead, the martian aurora is a highly concentrated and localized emission controlled by magnetic field anomalies in the martian crust.