We propose a theory of quark and lepton mass and mixing with non-universal Z′ couplings based on a 5d Standard Model with quarks and leptons transforming as triplets under a new gauged SO(3) isospin. In the 4d effective theory, the SO(3) isospin is broken to U(1)′, through a S1/(ℤ2×$$ {\mathrm{\mathbb{Z}}}_2^t $$
ℤ
2
t
) orbifold, then subsequently dynamically broken, resulting in a massive Z′. Quarks and leptons in the 5d bulk appear as massless modes, with zero Yukawa couplings to the Higgs on the brane, and zero couplings to Z′, at leading order, due to the U(1)′ symmetry. However, after the U(1)′ breaking, both Yukawa couplings and non-universal Z′ couplings are generated by heavy Kaluza-Klein exchanges. Hierarchical quark and lepton masses result from a hierarchy of 5d Dirac fermion masses. Neutrino mass and mixing arises from a novel type Ib seesaw mechanism, mediated by Kaluza-Klein Dirac neutrinos. The non-universal Z′ couplings may contribute to semi-leptonic B decay ratios which violate μ − e universality. In this model such couplings are related to the corresponding quark and lepton effective Yukawa couplings.