In disordered media, quantum interference effects are expected to induce complete suppression of electron conduction. The phenomenon, known as Anderson localization, has a counterpart with classical waves that has been observed in acoustics, electromagnetism and optics, but a direct observation for particles remains elusive. Here, we report the observation of the three-dimensional localization of ultracold atoms in a disordered potential created by a speckle laser field.A phenomenological analysis of our data distinguishes a localized component of the resulting density profile from a diffusive component. The observed localization cannot be interpreted as the classical trapping of particles with energy below the classical percolation threshold in the disorder, nor can it be understood as quantum trapping in local potential minima. Instead, our data are compatible with the self-consistent theory of Anderson localization tailored to our system, involving a heuristic energy shift that offers scope for future interpretation.