We consider the classical vacua of the Weinberg–Salam (WS) model of electroweak forces. These are no-particle, static solutions to the WS equations minimizing the WS energy locally. We study the WS vacuum solutions exhibiting a non-vanishing average magnetic field of strength b and prove that (i) there is a magnetic field threshold $$b_*$$
b
∗
such that for $$b<b_*$$
b
<
b
∗
, the vacua are translationally invariant (and the magnetic field is constant), while, for $$b>b_*$$
b
>
b
∗
, they are not, (ii) for $$b>b_*$$
b
>
b
∗
, there are non-translationally invariant solutions with lower energy per unit volume and with the discrete translational symmetry of a 2D lattice in the plane transversal to b, and (iii) the lattice minimizing the energy per unit volume approaches the hexagonal one as the magnetic field strength approaches the threshold $$b_*$$
b
∗
. In the absence of particles, the Weinberg–Salam model reduces to the Yang–Mills–Higgs (YMH) equations for the gauge group U(2). Thus, our results can be rephrased as the corresponding statements about the U(2)-YMH equations.