We consider heterotic Calabi-Yau compactifications with S (U (4)× U (1)) background gauge fields. These models lead to gauge groups with an additional U (1) factor which, under certain conditions, can combine with hypercharge to a B− L symmetry. The associated gauge boson is automatically super-massive and, hence, does not constitute a phenomenological problem. We illustrate this class of compactifications with a model based on the monad construction, which leads to a supersymmetric standard model with three families of quarks and leptons, one pair of Higgs doublets, three right-handed neutrinos and no exotics charged under the standard model group. The presence of the B− L symmetry means that the model is safe from proton decay induced by dimension four operators. Due to the presence of a special locus in moduli space where the bundle structure group is Abelian and the low-energy symmetry enhances we can also show the absence of dimension five proton-decay inducing operators.