We study the alignment of the vacuum in gauge theories with $N_f$ Dirac fermions transforming according to a complex representation of the gauge group. The alignment of the vacuum is produced by adding a small mass perturbation to the theory. We study in detail the $N_f=2,3$ and $4$ case. For $N_f=2$ and $N_f=3$ we reproduce earlier known results including the Dashen phase with spontaneous violation of the combined charge conjugation and parity symmetry, CP. For $N_f=4$ we find regions with and without spontaneous CP violation. We then generalize to an arbitrary number of flavors. Here it is shown that at the point where $N_f-1$ flavors are degenerate with positive mass $m>0$ and the mass of the $N_f$'th flavor becomes negative and equal to $-m$ CP breaks spontaneously.