We show that there exist functions c and g such that, if k, n and d are positive integers with d>g(n) and Γ is a d-valent 2-arc-transitive graph of order kpn with p a prime, then p⩽kc(d). In other words, there are only finitely many d-valent 2-arc-transitive graphs of order kpn with d>g(n) and p prime. This generalises a recent result of Conder, Li and Potočnik.