  A non anomalous horizontal $U(1)_H$ gauge symmetry can be responsible for the
fermion mass hierarchies of the minimal supersymmetric standard model. Imposing
the consistency conditions for the absence of gauge anomalies yields the
following results: i) unification of leptons and down-type quarks Yukawa
couplings is allowed at most for two generations. ii) The $\mu$ term is
necessarily somewhat below the supersymmetry breaking scale. iii) The
determinant of the quark mass matrix vanishes, and there is no strong $CP$
problem. iv) The superpotential has accidental $B$ and $L$ symmetries. The
prediction $m_{\rm up}=0$ allows for an unambiguous test of the model at low
energy.
