  We generalize current known distribution results on Shanks--R\'enyi prime
number races to the case where arbitrarily many residue classes are involved.
Our method handles both the classical case that goes back to Chebyshev and
function field analogues developed in the recent years. More precisely, let
$\pi(x;q,a)$ be the number of primes up to $x$ that are congruent to $a$ modulo
$q$. For a fixed integer $q$ and distinct invertible congruence classes
$a_0,a_1,\ldots,a_D$, assuming the generalized Riemann Hypothesis and a weak
version of the linear independence hypothesis, we show that the set of $x$ real
for which the inequalities $\pi(x;q,a_0)>\pi(x;q,a_1)> \ldots >\pi(x;q,a_D)$
are simultaneously satisfied admits a logarithmic density.
