We investigate which nonlocal-interaction energies have a ground state (global minimizer). We consider this question over the space of probability measures and establish a sharp condition for the existence of ground states. We show that this condition is closely related to the notion of stability (i.e. -stability) of pairwise interaction potentials. Our approach uses the direct method of the calculus of variations.