We perform a systematic study of models involving leptoquarks and diquarks with masses well below the grand unification scale and demonstrate that a large class of them is excluded due to rapid proton decay. After singling out the few phenomenologically viable color triplet and sextet scenarios, we show that there exist only two leptoquark models which do not suffer from tree-level proton decay and which have the potential for explaining the recently discovered anomalies in B meson decays. Both of those models, however, contain dimension five operators contributing to proton decay and require a new symmetry forbidding them to emerge at a higher scale. This has a particularly nice realization for the model with the vector leptoquark (3, 1) 2/3 , which points to a specific extension of the Standard Model, namely the Pati-Salam unification model, where this leptoquark naturally arises as the new gauge boson. We explore this possibility in light of recent B physics measurements. Finally, we analyze also a vector diquark model, discussing its LHC phenomenology and showing that it has nontrivial predictions for neutron-antineutron oscillation experiments. 6