  We prove an analogue of the Atiyah-Bott-Berline-Vergne localization formula
in the setting of equivariant basic cohomology of $K$-contact manifolds. As a
consequence, we deduce analogues of Witten's nonabelian localization and the
Jeffrey-Kirwan residue formula, which relate equivariant basic integrals on a
contact manifold $M$ to basic integrals on the contact quotient $M_0 :=
\mu^{-1}(0)/G$, where $\mu$ denotes the contact moment map for the action of a
torus $G$. In the special case that $M \to N$ is an equivariant Boothby-Wang
fibration, our formulae reduce to the usual ones for the symplectic manifold
$N$.
