A prime $p$ splits in $K$ if and only if $P(x)$ splits into distinct linear factors modulo $p$. In this answer, one can read:


  Let $P \in \Bbb Z[X]$.
  Let $K$ be the splitting field of $P(x)$. A prime $p$ splits in $K$ if and only if$^1$ $P(x)$ splits into distinct linear factors modulo $p$.
  
  1 With finitely many exceptions, related to the fact that the ring of integers in $K$ may not be $\mathbb{Z}[x]/P(x)$.


Question:
I would like to know the precise statement of this claim (e.g. what are these "finitely many exceptions"), and how to prove this statement.



I am aware of Dedekind's factorization theorem, stated here :


  Let $K$ be  a  number   field  and $a \in O_K$ such  that $K=\Bbb Q(a)$. 
  Let $f(T)$ be  the  minimal  polynomial  of $a$ in $\Bbb Z[T]$.  For  any  prime $p$ not  dividing $[O_K:\Bbb Z[a]]$,write
  $$f(T) = \pi_1(T)^{e_1}\cdots \pi_r(T)^{e_r} \pmod p,$$ where  the $\pi(T)$'s  are  distinct  monic  irreducibles  in $\Bbb Fp[T]$.   Then $(p) =pO_K$ factors  into prime ideals as
  $$(p) = P_1^{e_1}\cdots P_r^{e_r},$$ where there is a bijection between the $P_i$'s and $\pi(T)$'s such that $N(P_i)=p^{deg(\pi_i)}$.


In order to prove $\Longleftarrow$ in the statement above, I would like to apply Dedekind's factorization theorem. But I don't know how I could take $P(T)=f(T)$, i.e. $P$ is the minimal polynomial of an element $a \in O_K$ such that $K=\Bbb Q(a)$ (only knowing that the roots of $P$ are $r_1,\dots,r_n$ such that $K=\Bbb Q(r_1,\dots,r_n)$).

Moreover, I don't see how to get "$\implies$".

Here are some related questions: (1), (2), (3), (4).
Apply the Dedekind theorem to $\mathbb{Q}(r_i)$ and use the fact that if a prime splits in a several fields then it splits in their composite.
Apply the Dedekind theorem to $\mathbb{Q}(r_i)$ and use the fact that if a prime splits in a several fields then it splits in their composite.