  $SU(N)$ gauge theory is time reversal invariant at $\theta=0$ and
$\theta=\pi$. We show that at $\theta=\pi$ there is a discrete 't Hooft anomaly
involving time reversal and the center symmetry. This anomaly leads to
constraints on the vacua of the theory. It follows that at $\theta=\pi$ the
vacuum cannot be a trivial non-degenerate gapped state. (By contrast, the
vacuum at $\theta=0$ is gapped, non-degenerate, and trivial.) Due to the
anomaly, the theory admits nontrivial domain walls supporting lower-dimensional
theories. Depending on the nature of the vacuum at $\theta=\pi$, several phase
diagrams are possible. Assuming area law for space-like loops, one arrives at
an inequality involving the temperatures at which CP and the center symmetry
are restored. We also analyze alternative scenarios for $SU(2)$ gauge theory.
The underlying symmetry at $\theta=\pi$ is the dihedral group of 8 elements. If
deconfined loops are allowed, one can have two $O(2)$-symmetric fixed points.
It may also be that the four-dimensional theory around $\theta=\pi$ is gapless,
e.g. a Coulomb phase could match the underlying anomalies.
