We establish results of Bombieri-Vinogradov type for the von Mangoldt function Λ(n) twisted by a nilsequence. In particular, we obtain Bombieri-Vinogradov type results for the von Mangoldt function twisted by any polynomial phase e(P (n)); the results obtained are as strong as the ones previously known in the case of linear exponential twists. We derive a number of applications of these results. Firstly, we show that the primes p obeying a "nil-Bohr set" condition, such as αp k < ε, exhibit bounded gaps. Secondly, we show that the Chen primes are well-distributed in nil-Bohr sets, generalizing a result of Matomäki. Thirdly, we generalize the Green-Tao result on linear equations in the primes to primes belonging to an arithmetic progression to large modulus q ≤ x θ , for almost all q.