We present ab initio calculations of the evolution of anisotropic magnetoresistance ͑AMR͒ in Ni nanocontacts from the ballistic to the tunnel regime. We find an extraordinary enhancement of AMR, compared to bulk, in two scenarios. In systems without localized states, such as chemically pure break junctions, large AMR only occurs if the orbital polarization of the current is large, regardless of the anisotropy of the density of states. In systems that display localized states close to the Fermi energy, such as a single electron transistor with ferromagnetic electrodes, large AMR is related to the variation of the Fermi energy as a function of the magnetization direction.